Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Environment and Utilities /
Chapter 8 - QuickDraw GX Mathematics / QuickDraw GX Mathematics Reference
Number-Conversion Macros / Format Conversions


FloatToFixed

You can use the FloatToFixed macro to convert a floating-point number to a Fixed number.

#define FloatToFixed(a) ((Fixed)((float) (a) * fixed1))
a
A floating-point number to be converted to a Fixed number.
macro result
The closest Fixed number to the floating-point number.
SPECIAL CONSIDERATIONS
QuickDraw GX also defines a shorthand version of this macro. The FloatToFixed macro can also be coded as fl(a).

SEE ALSO
The fl macro is described next.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996