Searched defs:number_t (Results 1 – 3 of 3) sorted by relevance
218 struct number_t struct220 void init () { set_real (0.0); } in init()221 void fini () {} in fini()223 void set_int (int v) { value = (double) v; } in set_int()224 int to_int () const { return (int) 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 (int32_t) (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 int ceil () const { return (int) ::ceil (value); } in ceil()[all …]
218 struct number_t struct220 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()[all …]