Searched refs:maxval (Results 1 – 2 of 2) sorted by relevance
32 static inline int64_t toint(double x, int64_t maxval) { in toint() argument35 v = static_cast<int64_t>(floor(x * maxval + 0.5)); in toint()36 if (v >= maxval) { in toint()37 return maxval - 1; // error! in toint()
152 static inline int64_t toint(double x, int64_t maxval, double& err) { in toint() argument153 double val = x * maxval; in toint()159 static inline int64_t toint(double x, int64_t maxval) { in toint() argument160 return static_cast<int64_t>(floor(x * maxval + 0.5)); in toint()