[Overview][Types][Procedures and functions][Index] Reference for unit 'GraphMath' (#lcl)

Quadrant

Determine the Quadrant of any point, given the Center

Declaration

Source position: graphmath.pp line 92

function Quadrant(

  PT: TPoint;

  Center: TPoint

):Integer;

Description

Method: Quadrant

Params:   PT, Center
  Returns:  Integer

  Use Quadrant to determine the Quadrant of any point, given the Center.
  It is primarily for use in other routines such as EccentricAngle. A result
  of 1-4 represents the primary 4 quardants. A result of 5-8 means the point
  lies on one of the Axis', 5 = -Y Axis, 6 = +X Axis, 7 = +Y Axis, and
  8 = -X Axis. A result of -1 means that it does not fall in any quadrant,
  that is, it is the Center.
The latest version of this document can be found at lazarus-ccr.sourceforge.net.