math docs
    Preparing search index...

    Function centroid

    • Computes the centroid of the triangle (a, b, c).

      Parameters

      • out: vec2.Vec2

        the output vector to store the result.

      • a: readonly [number, number]

        the first vertex of the triangle.

      • b: readonly [number, number]

        the second vertex of the triangle.

      • c: readonly [number, number]

        the third vertex of the triangle.

      Returns vec2.Vec2

      out.