Xojo.Core.Point.DistanceTo

From Xojo Documentation

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

Xojo.Core.Point.DistanceTo(Other As Xojo.Core.Point) As Double

Supported for all project types and targets.

Returns a double that measures the distance between the two points.

Sample Code

Calculate the distance (length of the line) between two points:

Var p1 As New Xojo.Core.Point(10, 20)
Var p2 As New Xojo.Core.Point(200, 5)
Var dist As Double = p1.DistanceTo(p2)