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: vec2.Vec2

        first endpoint of the first segment

      • b: vec2.Vec2

        second endpoint of the first segment

      • c: vec2.Vec2

        first endpoint of the second segment

      • d: vec2.Vec2

        second endpoint of the second segment

      Returns boolean

      true if the segments intersect