diff --git a/src/corelib/math/vec.h b/src/corelib/math/vec.h index a98452f..601e6c4 100644 --- a/src/corelib/math/vec.h +++ b/src/corelib/math/vec.h @@ -10,8 +10,9 @@ void clamp_magnitude(float* xx, float* yy, float max_magnitude) { if(m > max_magnitude) { x /= m; y /= m; x *= max_magnitude; y *= max_magnitude; + } else { + *xx = x; *yy = y; } - *xx = x; *yy = y; } static inline