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


The PointToPolar function converts a point in Cartesian coordinates to the identical point in polar coordinates.

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

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

The gxPolar structure is described in the section "Constants and Data Types" beginning on page 8-35. The PolarToPoint function converts a point in polar coordinates to the identical point in Cartesian coordinates. The PolarToPoint function is described in the previous section.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996