Method PointLineNearestPoint
PointLineNearestPoint(float3, float3, float3, out float)
Returns the nearest point on a finite line segment to a point.
Declaration
public static float3 PointLineNearestPoint(float3 p, float3 a, float3 b, out float lineParam)
Parameters
Type | Name | Description |
---|---|---|
float3 | p | The point to compare to. |
float3 | a | The line start point. |
float3 | b | The line end point. |
float | lineParam | The signed distance between point 'a' and the projection of point 'p' on the line segment. |
Returns
Type | Description |
---|---|
float3 | The nearest point on a line segment to another point. |