Xojo.Core.Point.Compare

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
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