Searched refs:real_number (Results 1 – 1 of 1) sorted by relevance
182 static inline uint16_t RealToFixed115(const float real_number) { in RealToFixed115() argument183 SCHECK(InRange(real_number, 0.0f, 2048.0f), in RealToFixed115()184 "Value out of range! %.2f", real_number); in RealToFixed115()187 const float round_add = (real_number > 0.0f) ? 0.5f : -0.5f; in RealToFixed115()188 return static_cast<uint16_t>(real_number * kMult + round_add); in RealToFixed115()196 static inline int RealToFixed1616(const float real_number) { in RealToFixed1616() argument198 SCHECK(InRange(real_number, -kMult, kMult), in RealToFixed1616()199 "Value out of range! %.2f", real_number); in RealToFixed1616()201 const float round_add = (real_number > 0.0f) ? 0.5f : -0.5f; in RealToFixed1616()202 return static_cast<int>(real_number * kMult + round_add); in RealToFixed1616()