

AngleFromSlope
You can convert a slope value to an angle value using theAngleFromSlope
function.
FUNCTION AngleFromSlope (slope: Fixed): Integer;
slope
 The slope, defined as Dx/Dy, which is the horizontal change divided by the vertical change between any two points on a line with the slope.
DESCRIPTION
TheAngleFromSlope
function returns the angle corresponding to the slope specified in theslope
parameter treatedMOD
180. Angles are defined in clockwise degrees from 12 o'clock. The negative yaxis is defined as being at 12 o'clock, and the positive yaxis at 6 o'clock. The xaxis is defined as usual, with the positive side defined as being at 3 o'clock.SPECIAL CONSIDERATIONS
TheAngleFromSlope
function is most useful when you require speed more than accuracy in performing the calculation. The integer result is within 1 degree of the correct answer, but not necessarily within half a degree.SEE ALSO
For an example of the use of theAngleFromSlope
function, see Figure 37 on page 313.
Get information on Apple products.
Visit the Apple Store online or at retail locations. 1800MYAPPLE Copyright © 2004 Apple Computer, Inc. All rights reserved.  Terms of use  Privacy Notice 