math docs
    Preparing search index...

    Function overlapConvex

    • Tests whether two convex polygons overlap, using the separating axis theorem. Both polygons must be convex; results are undefined for concave input. Polygons that touch along an edge or vertex are considered overlapping.

      Parameters

      • verticesA: number[]

        vertices of the first polygon [x0, y0, x1, y1, ...]

      • numA: number

        number of vertices in the first polygon

      • verticesB: number[]

        vertices of the second polygon [x0, y0, x1, y1, ...]

      • numB: number

        number of vertices in the second polygon

      Returns boolean

      true if the polygons overlap