Closed quasiyoke closed 1 year ago
We'd like to have a macro allowing to const-antly construct FixedPoints out of literals:
const
FixedPoint
fixed_point!(3) //=> 3.0 fixed_point!(0.12) //=> 0.12 fixed_point!(-123_456.789_987) //=> -123456.789987
Extra:
fixed_point!(3%) //=> 0.03 fixed_point!(3.45e-4) //=> 0.000345
The primary usage is covered by fixnum_const! for a long time.
fixnum_const!
We'd like to have a macro allowing to
const
-antly constructFixedPoint
s out of literals:Extra: