Function: calculatePolygonMomentOfInertia()
calculatePolygonMomentOfInertia(
mass,verticesAboutCentroid):number
Defined in: physics/shapes/polygon-math.ts:80
Calculates the moment of inertia of a polygon for a given mass, about its own center of mass.
Parameters
mass
number
The mass of the body the polygon belongs to.
verticesAboutCentroid
readonly Vector2[]
The polygon's vertices, in order, relative to its own centroid (i.e. already translated so their average, weighted by calculateCentroid, is the origin).
Returns
number
The moment of inertia of the polygon.