Unit 'LCLProc' Package
[Overview][Types][Classes][Procedures and functions][Variables][Index] [#lcl]

ComparePoints

Compares the specified TPoint values to get their relative order.

Declaration

Source position: lclproc.pas line 136

function ComparePoints(

  const p1: TPoint;

  const p2: TPoint

):Integer;

Arguments

p1

  

First TPoint instance for the comparison.

p2

  

Second TPoint instance for the comparison.

Function result

Relative order for the compared TPoint values.

Description

ComparePoints is an Integer function used to compare the coordinates in the specified TPoint instances to determine their relative order. The return value contains -1, 0, or 1 for the following conditions:

-1
p1.y is smaller than p2.y, or p1.x is smaller than p2.x.
0
p1 and p2 have the same x and y values.
1
p1.y is larger than p2.y, or p1.x is larger than p2.x.


CT Web help

CodeTyphon Studio