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
Mathematical Functions / Cartesian and Polar Coordinate Point Conversions


You can use the PolarToPoint function to convert a point in polar coordinates to the identical point in Cartesian coordinates.

gxPoint *PolarToPoint(const gxPolar *ra, gxPoint *xy);
A pointer to the point in polar coordinates.
A pointer to the destination of the resulting point in Cartesian coordinates.
function result
A pointer to the converted point (also a pointer to the xy parameter).
The PolarToPoint function converts the polar coordinate point (r, a) to the identical Cartesian coordinate point (x, y). The parameters of the PolarToPoint function are the gxPolar structure pointer ra and a gxPoint structure pointer xy.

If both pointers point to the same location, the source gxPolar structure will be converted to a gxPoint structure and will replace the gxPolar structure.

The gxPolar structure is described in the section "Constants and Data Types" beginning on page 8-35. Polar coordinate to Cartesian coordinate conversions are discussed in the section "Cartesian and Polar Coordinate Conversion" beginning on page 8-10. The PointToPolar function converts a point in Cartesian coordinates to the identical point in polar coordinates. The PointToPolar function is described next.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996