getInertia method

double getInertia()

Get the central rotational inertia of the body, usually in kg-m^2.

Implementation

double getInertia() {
  return inertia +
      _mass *
          (sweep.localCenter.x * sweep.localCenter.x +
              sweep.localCenter.y * sweep.localCenter.y);
}