Lines Matching +refs:sign +refs:max

9 T clamp(const T &value, const T &min, const T &max)
11 return std::max(min, std::min(value, max));
15 T mirror(const T &value, const T &max) in mirror() argument
17 return max - value; in mirror()
21 T mirror(const T &value, const T &min, const T &max) in mirror() argument
23 return max - value + min; in mirror()
26 float normalize(const float &value, const float &max) in normalize() argument
28 return value / max; in normalize()
31 float logScale(const float value, const float min, const float max) in logScale() argument
35 if (value > max) in logScale()
36 return max; in logScale()
38 const float b = std::log(max / min) / (max - min); in logScale()
39 const float a = max / std::exp(max * b); in logScale()
44 float invLogScale(const float value, const float min, const float max) in invLogScale() argument
48 if (value > max) in invLogScale()
49 return max; in invLogScale()
51 const float b = std::log(max / min) / (max - min); in invLogScale()
52 const float a = max / std::exp(max * b); in invLogScale()
57 float randomNumber(const float min, const float max) in randomNumber() argument
59 return ((float)std::rand() / (float)RAND_MAX * (max - min)) + min; in randomNumber()
239 const char sign = value < 0 ? '-' : '\0'; in toHexFloat() local
265 if (sign) in toHexFloat()
266 length = std::sprintf(buffer, "%c0x", sign); in toHexFloat()
342 double sign; in parseHexFloat() local
346 sign = -1.0; in parseHexFloat()
351 sign = 1.0; in parseHexFloat()
412 return sign * (mantissa * ipow2(exponent)); in parseHexFloat()