math docs
    Preparing search index...

    Function bounds

    • Writes the axis-aligned bounding box of the polygon into out as a Box2 [minX, minY, maxX, maxY].

      Parameters

      • out: box2.Box2

        the box to store the result

      • vertices: number[]

        polygon vertices as a flat array [x0, y0, x1, y1, ...]

      • n: number

        number of vertices to read from vertices

      Returns box2.Box2

      out