Click or drag to resize

UtilPointBetween(Vector3, Vector3, Vector3) Method

P is expected to be on the projection of [U1,U2] but this function will return whether it is between U1 and U2 (using 10^-6 as the tolerance for comparisons).

Namespace: Demo3D.Common
Assembly: Demo3D.Common (in Demo3D.Common.dll) Version: 19.01.00
Syntax
C#
public static bool PointBetween(
	Vector3 P,
	Vector3 U1,
	Vector3 U2
)

Parameters

P  Vector3
Point to test.
U1  Vector3
Start of line segment.
U2  Vector3
End of line segment.

Return Value

Boolean
True if the point P (projected onto the line segment) is between the start and end of the segment, false otherwise.
Remarks
If U1 is equal to U2, then this will always return true.
See Also