Xojo.Core.Point.Negate

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Method

Xojo.Core.Point.Operator_Negate() As Xojo.Core.Point

Supported for all project types and targets.

Use the negate operator (-) to create a new point with the X and Y coordinates negated.

Sample Code

Negate an existing point to get a new point:

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

p2 = -p1 // p2 is (-50, -50)