20 QuickDraw3D Mathematical Utilities

20 Utility Functions

QuickDraw3D provides several mathematical utility functions. You can use the following two macros to convert degrees to radians, and vice versa.

#define Q3Math_DegreesToRadians(x)            ((x) * kQ3Pi / 180.0)
#define Q3Math_RadiansToDegrees(x)            ((x) * 180.0 / kQ3Pi)
You can use the following two macros to get the minimum and maximum of two values.

#define Q3Math_Min(x,y)         ((x) <= (y) ? (x) : (y))
#define Q3Math_Max(x,y)         ((x) >= (y) ? (x) : (y))

3D Graphics Programming with QuickDraw 3D - 17 OCT 1995

© Apple Computer, Inc.

Let us know what you think of these prototype pages.

Generated with Harlequin WebMaker