UtilIntersectLineLine(Vector2, Vector2, Vector2, Vector2) Method |
Calculate the intersection point of two line segments.
Namespace: Demo3D.CommonAssembly: Demo3D.Common (in Demo3D.Common.dll) Version: 19.01.00
Syntaxpublic static Vector2? IntersectLineLine(
Vector2 p1,
Vector2 p2,
Vector2 q1,
Vector2 q2
)
Parameters
- p1 Vector2
- Start of first line segment.
- p2 Vector2
- End of first line segment.
- q1 Vector2
- Start of second line segment.
- q2 Vector2
- End of second line segment.
Return Value
NullableVector2null if no intersection, or a
Vector2 containing the intersection point.
See Also