Important: The information in this document is obsolete and should not be used for new development.
AngleFromSlope
You can convert a slope value to an angle value using theAngleFromSlopefunction.
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
TheAngleFromSlopefunction returns the angle corresponding to the slope specified in theslopeparameter treatedMOD180. Angles are defined in clockwise degrees from 12 o'clock. The negative y-axis is defined as being at 12 o'clock, and the positive y-axis at 6 o'clock. The x-axis is defined as usual, with the positive side defined as being at 3 o'clock.SPECIAL CONSIDERATIONS
TheAngleFromSlopefunction 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 theAngleFromSlopefunction, see Figure 3-7 on page 3-13.