MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / half

Function half

inst/include/Rcpp/sugar/functions/median.h:69–71  ·  view source on GitHub ↗

compiler does not know how to handle Rcomplex numerator / double denominator and need explicit cast for INTSXP case

Source from the content-addressed store, hash-verified

67// Rcomplex numerator / double denominator
68// and need explicit cast for INTSXP case
69inline double half(double lhs) {
70 return lhs / 2.0;
71}
72
73inline double half(int lhs) {
74 return static_cast<double>(lhs) / 2.0;

Callers 3

MedianClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected