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


FloatToFract

You can use the FloatToFract macro to convert a floating-point number to a fract number.

define FloatToFract(a) ((fract)((float)(a)*fract1))
a
A floating-point number to be converted to a fract number.
macro result
A fract number having the closest value to the floating-point number.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996