FloatToFract
You can use theFloatToFractmacro to convert a floating-point number to afractnumber.
define FloatToFract(a) ((fract)((float)(a)*fract1))
a- A floating-point number to be converted to a
fractnumber.- macro result
- A
fract number having the closest value to the floating-point number.