Click or drag to resize

LineToolsDoLineSegmentsIntersect Method (Double, Double, Double, Double, Double, Double, Double, Double)

Returns true if two line segments intersects. The lines are said to intersect if the lines axctually crosses and not if they only share a point.

Namespace:  DHI.Mike1D.Generic.Spatial.Algorithm
Assembly:  DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 16.0.0.0 (11.1.1.1111)
Syntax
C#
public static bool DoLineSegmentsIntersect(
	double x1,
	double y1,
	double x2,
	double y2,
	double x3,
	double y3,
	double x4,
	double y4
)

Parameters

x1
Type: SystemDouble
x-coordinate for first point in first line segment
y1
Type: SystemDouble
y-coordinate for first point in first line segment
x2
Type: SystemDouble
x-coordinate for second point in first line segment
y2
Type: SystemDouble
y-coordinate for second point in first line segment
x3
Type: SystemDouble
x-coordinate for the first point in second line segment
y3
Type: SystemDouble
y-coordinate for the first point in second line segment
x4
Type: SystemDouble
x-coordinate for the second point in the second line segment
y4
Type: SystemDouble
y-coordinate for the second point in the second line segment

Return Value

Type: Boolean
True if the line segments intersects otherwise false.
See Also