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
Constants and Data Types


Number Formats and Constants

QuickDraw GX provides Fixed, fract, and gxColorValue number formats. Polar coordinates are defined by the gxPolar structure. A structure consisting of two long values defines the wide number format.

typedef long fract;
typedef unsigned short gxColorValue;
struct gxPolar {
   Fixed radius;
   Fixed angle;
};
struct wide {
   long hi;
   unsigned long lo;
};
For convenience, QuickDraw GX provides constants for the value 1.0 for Fixed, fract, and gxColorValue types:

#define fixed1        ((Fixed) 0x00010000)
#define fract1        ((fract) 0x40000000)
#define gxColorValue1 ((gxColorValue) 0xFFFF)
QuickDraw GX also provides constants for the largest and smallest possible values for Fixed and fract numbers:

#define gxPositiveInfinity ((Fixed) 0x7FFFFFFF)
#define gxNegativeInfinity ((Fixed) 0x80000000)

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996