gradum-kit - v0.1.0
    Preparing search index...

    Function intersectSegments

    • Function

      intersectSegments

      Parameters

      • a: Point

        Start of the first segment.

      • b: Point

        End of the first segment.

      • c: Point

        Start of the second segment.

      • d: Point

        End of the second segment.

      Returns Point

      A new point at the crossing, or null if the segments do not cross. Parallel segments always return null, including collinear ones that overlap.

      Find where two line segments cross, if they do. Only a crossing within both segments counts; an intersection that would fall beyond either one is not reported.