Click or drag to resize
Accord.NET (logo)

LineSegmentGetIntersectionWith Method (LineSegment)

Finds, provided it exists, the intersection point with the specified LineSegment.

Namespace:  Accord.Math.Geometry
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax
public Nullable<Point> GetIntersectionWith(
	LineSegment other
)
Request Example View Source

Parameters

other
Type: Accord.Math.GeometryLineSegment
LineSegment to find intersection with.

Return Value

Type: NullablePoint
Returns intersection point with the specified LineSegment, or , if the two segments do not intersect.
Exceptions
ExceptionCondition
InvalidOperationExceptionThrown if the segments overlap - if they have multiple points in common.
Remarks

If the two segments do not intersect, the method returns . If the two segments share multiple points, this throws an InvalidOperationException.

See Also