Click or drag to resize

TwoDPointToLineDistance Method

Calculates distance from line to point.

Namespace:  TouchScript.Utils.Geom
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public static float PointToLineDistance(
	Vector2 lineStart,
	Vector2 lineEnd,
	Vector2 point
)

Parameters

lineStart
Type: Vector2
Line "starting" point.
lineEnd
Type: Vector2
Line "ending" point.
point
Type: Vector2
Point to calculate the distance to.

Return Value

Type: Single
Distance between point and line.
See Also