math docs
    Preparing search index...

    Function reverse

    • Reverses the winding order of the polygon, writing the result into out. out may be the same array as vertices to reverse in place.

      Parameters

      • out: number[]

        the array to write the reversed polygon into

      • vertices: number[]

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

      • n: number

        number of vertices to read from vertices

      Returns number[]

      out