diff --git a/Dynamics/RigidBody.h b/Dynamics/RigidBody.h index baff174..5092db6 100644 --- a/Dynamics/RigidBody.h +++ b/Dynamics/RigidBody.h @@ -82,14 +82,14 @@ namespace dynamics { if (sprite->calc_cm()) curr_cm_local += { static_cast(r_loc), static_cast(c_loc) }; - Ixx += math::sq(r_loc); - Iyy += math::sq(c_loc); + Ixx += static_cast(math::sq(r_loc)); + Iyy += static_cast(math::sq(c_loc)); num_points++; } } } if (sprite->calc_cm()) - curr_cm_local /= num_points; + curr_cm_local /= static_cast(num_points); auto density = mass / num_points; Ixx *= density;