Xojo.Core.Point.Subtract

From Xojo Documentation

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

Xojo.Core.Point.Operator_Subtract(p2 As Xojo.Core.Point) As Xojo.Core.Point

Supported for all project types and targets.

Use the subtraction operator (-) to subtract the coordinates of two points to get a new Point.

Sample Code

Subtract two points to get a new point:

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

Var p3 As Xojo.Core.Point
p3 = p1 - p2 // p3 is (40, 40)