Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/centerOfMass"

Index

Functions

Functions

centerOfMass

  • centerOfMass(vertices: Vector2[], triangles: number[]): [Vector2, number]
  • Get the center of mass of a polygon.

    Parameters

    • vertices: Vector2[]

      Vertices of polygon

    • triangles: number[]

      Triangles of polygon

    Returns [Vector2, number]

    Center of mass and mass of polygon

Generated using TypeDoc