Lines Matching defs:number_t
218 struct number_t struct
220 void init () { set_real (0.0); } in init()
221 void fini () {} in fini()
223 void set_int (int v) { value = v; } in set_int()
224 int to_int () const { return value; } in to_int()
226 void set_fixed (int32_t v) { value = v / 65536.0; } in set_fixed()
227 int32_t to_fixed () const { return value * 65536.0; } in to_fixed()
229 void set_real (double v) { value = v; } in set_real()
230 double to_real () const { return value; } in to_real()
232 bool in_int_range () const in in_int_range()
235 bool operator > (const number_t &n) const { return value > n.to_real (); } in operator >()
236 bool operator < (const number_t &n) const { return n > *this; } in operator <()
237 bool operator >= (const number_t &n) const { return !(*this < n); } in operator >=()
238 bool operator <= (const number_t &n) const { return !(*this > n); } in operator <=()
240 const number_t &operator += (const number_t &n) in operator +=()
248 double value;