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 this line does not intersect with the segment.

Remarks

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

Exceptions

ExceptionCondition
System..::.InvalidOperationExceptionThrown if other is a portion of this line.

See Also