From 4484c448b2828fc63f9e87002c4b9c485a69725c Mon Sep 17 00:00:00 2001 From: Rasmus Anthin Date: Sun, 15 Dec 2024 13:54:49 +0100 Subject: [PATCH] Fixing windows warnings. --- Dynamics/RigidBody.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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;