MCPcopy
hub / github.com/KilledByAPixel/LittleJS / getCenterOfMass

Method getCenterOfMass

plugins/box2d.js:371–371  ·  view source on GitHub ↗

Gets the center of mass * @return {Vector2}

()

Source from the content-addressed store, hash-verified

369 /** Gets the center of mass
370 * @return {Vector2} */
371 getCenterOfMass() { return box2d.vec2From(this.body.GetWorldCenter()); }
372
373 /** Gets the linear velocity
374 * @return {Vector2} */

Callers 3

applyForceMethod · 0.95
applyAccelerationMethod · 0.95
applyImpulseMethod · 0.95

Calls 1

vec2FromMethod · 0.80

Tested by

no test coverage detected