Click or drag to resize
LineSegment2FIntersect Method (Vector2F, Vector2F, Vector2F, Vector2F, Vector2F)
This method detects if two line segments intersect, and, if so, the point of intersection. Note: If two line segments are coincident, then no intersection is detected (there are actually infinite intersection points).

Namespace: Slash.Math.Geometry.Lines
Assembly: Slash.Math (in Slash.Math.dll) Version: 1.0.6018.40177
Syntax
public static bool Intersect(
	ref Vector2F point1,
	ref Vector2F point2,
	ref Vector2F point3,
	ref Vector2F point4,
	out Vector2F intersectionPoint
)

Parameters

point1
Type: Slash.Math.Algebra.VectorsVector2F
The first point of the first line segment.
point2
Type: Slash.Math.Algebra.VectorsVector2F
The second point of the first line segment.
point3
Type: Slash.Math.Algebra.VectorsVector2F
The first point of the second line segment.
point4
Type: Slash.Math.Algebra.VectorsVector2F
The second point of the second line segment.
intersectionPoint
Type: Slash.Math.Algebra.VectorsVector2F
This is set to the intersection point if an intersection is detected.

Return Value

Type: Boolean
True if an intersection is detected, false otherwise.
See Also