pixi.js
    Preparing search index...

    Function segmentIntersection

    • Advanced

      Computes the point where non-coincident and non-parallel segments intersect. Coincident, parallel or non-intersecting segments return a NaN point {x: NaN, y: NaN}. The intersection point must land inside the extents of the segments or return a NaN Point.

      Note: Only available with pixi.js/math-extras.

      Type Parameters

      Parameters

      • aStart: PointData

        Starting point of the first segment.

      • aEnd: PointData

        Ending point of the first segment.

      • bStart: PointData

        Starting point of the second segment.

      • bEnd: PointData

        Ending point of the second segment.

      • OptionaloutPoint: T

        A Point-like object in which to store the value, optional (otherwise will create a new Point).

      Returns T

      The point where the segments intersect or a NaN Point.