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

Namespace:  AForge.Math.Geometry
Assembly:  AForge.Math (in AForge.Math.dll) Version: 2.2.5.0 (2.2.5.0)

Syntax

C#
public Nullable<Point> GetIntersectionWith(
	LineSegment other
)

Parameters

other
Type: AForge.Math.Geometry..::.LineSegment
LineSegment to find intersection with.

Return Value

Returns intersection point with the specified LineSegment, or nullNothingnullptra null reference (Nothing in Visual Basic), if the two segments do not intersect.

Remarks

If the two segments do not intersect, the method returns nullNothingnullptra null reference (Nothing in Visual Basic). If the two segments share multiple points, this throws an InvalidOperationException.

Exceptions

ExceptionCondition
System..::.InvalidOperationExceptionThrown if the segments overlap - if they have multiple points in common.

See Also