Method DistancePointLine
DistancePointLine(float3, float3, float3)
Gets the distance from a point to a line segment.
Declaration
public static float DistancePointLine(float3 p, float3 a, float3 b)
Parameters
Type | Name | Description |
---|---|---|
float3 | p | The point to compare against. |
float3 | a | The start point of the line segment. |
float3 | b | The end point of the line segment. |
Returns
Type | Description |
---|---|
float | Returns the distance of the closest line from a point to a line segment. |