getInertia method

double getInertia ()

Get the central rotational inertia of the body.

@return the rotational inertia, usually in kg-m^2.

Implementation

double getInertia() {
  return _I +
      _mass *
          (_sweep.localCenter.x * _sweep.localCenter.x +
              _sweep.localCenter.y * _sweep.localCenter.y);
}