math docs
    Preparing search index...

    Function intersects

    • Tests whether the two closed segments a-b and c-d intersect. Collinear (overlapping) segments are treated as non-intersecting; touching at an endpoint counts as an intersection.

      Parameters

      • a: readonly [number, number]

        first endpoint of the first segment

      • b: readonly [number, number]

        second endpoint of the first segment

      • c: readonly [number, number]

        first endpoint of the second segment

      • d: readonly [number, number]

        second endpoint of the second segment

      Returns boolean

      true if the segments intersect