Important: The information in this document is obsolete and should not be used for new development.
FloatToFixed
You can use theFloatToFixedmacro to convert a floating-point number to aFixednumber.
#define FloatToFixed(a) ((Fixed)((float) (a) * fixed1))
a- A floating-point number to be converted to a
Fixednumber.- macro result
- The closest
Fixed number to the floating-point number.SPECIAL CONSIDERATIONS
QuickDraw GX also defines a shorthand version of this macro. TheFloatToFixedmacro can also be coded asfl(a).SEE ALSO
Theflmacro is described next.