Xojo.Core.Point.Compare

From Xojo Documentation

Revision as of 17:37, 11 August 2019 by Gperlman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Method

Xojo.Core.Point.Operator_Compare(rhs As Xojo.Core.Point) As Integer

Supported for all project types and targets.

You can use comparison operators to determine if one point is greater than another. A point is compared using its X value first and then the Y value if both X values are the same.

Sample Code

Compare two points:

Var p1 As New Xojo.Core.Point(50, 50)
Var p2 As New Xojo.Core.Point(25, 60)

If p1 > p2 Then
// True, because 50 > 25
End If