Table of Contents

Method Intersect

Namespace
Pinwheel.Vista.Geometric
Assembly
Pinwheel.Vista.Runtime.dll

Intersect(Line2D, Line2D, out Vector2)

Tests whether two finite segments intersect and returns the intersection point when they do.

public static bool Intersect(Line2D l1, Line2D l2, out Vector2 point)

Parameters

l1 Line2D

The first segment.

l2 Line2D

The second segment.

point Vector2

The intersection point when the segments intersect; otherwise an unspecified value.

Returns

bool

true when the segments intersect within both finite segment extents; otherwise, false.

Remarks

Parallel or coincident lines are reported as non-intersecting by this method. The extent test uses squared distances from the computed intersection point to each endpoint rather than parametric coordinates.