diff --git a/rehlds/engine/mathlib_e.h b/rehlds/engine/mathlib_e.h index 9f44f18..0a02545 100644 --- a/rehlds/engine/mathlib_e.h +++ b/rehlds/engine/mathlib_e.h @@ -67,16 +67,13 @@ inline float M_sqrt(float value) { inline double M_sqrt(double value) { double ret; auto v = _mm_load_sd(&value); - _mm_store_pd(&ret, _mm_sqrt_sd(v, v)); + _mm_store_sd(&ret, _mm_sqrt_sd(v, v)); return ret; } inline double M_sqrt(long double value) { - double ret; - auto v = _mm_load_sd((double *)&value); - _mm_store_pd(&ret, _mm_sqrt_sd(v, v)); - return ret; + return M_sqrt(double(value)); } float anglemod(float a);