Xojo.Core.Point.Zero

From Xojo Documentation

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

Xojo.Core.Point.Zero() As Xojo.Core.Point

Supported for all project types and targets.

Returns a Point with an (x, y) of (0, 0). This is a convenience for creating a new Point with those coordinates and allows the implementation to have a singleton value (as Point objects are immutable).

Sample Code

Calculate the distance from (0, 0):

Var origPoint As New Xojo.Core.Point(123, 456)
Var distance As Double = Xojo.Core.Point.Zero.DistanceTo(origPoint)