diff --git a/src/vmath.h b/src/vmath.h index 58d6ed1..87749c3 100644 --- a/src/vmath.h +++ b/src/vmath.h @@ -75,7 +75,7 @@ float vmagnitudef(Vector a) { } static inline float vsqrmagnitudef(Vector a) { - return a.x*a.x + a.y*a.y; + return fabsf(a.x*a.x) + fabsf(a.y*a.y); } static inline Vector vnormalizedf(Vector a) {