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)