GeometryUtil.GetDistance(Single, Single, Single, Single) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Calculates the distance between two points.
public:
static float GetDistance(float x1, float y1, float x2, float y2);
public static float GetDistance(float x1, float y1, float x2, float y2);
static member GetDistance : single * single * single * single -> single
Public Shared Function GetDistance (x1 As Single, y1 As Single, x2 As Single, y2 As Single) As Single
Parameters
- x1
- Single
The x-coordinate of the first point.
- y1
- Single
The y-coordinate of the first point.
- x2
- Single
The x-coordinate of the second point.
- y2
- Single
The y-coordinate of the second point.
Returns
The Euclidean distance between the two points.