now using absolute values for vsqrmagnitudef

This commit is contained in:
Sara 2023-10-06 23:41:52 +02:00
parent dae9be6196
commit 7b8f3565dd

View file

@ -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) {