clamp_magnitude no longer outputs input x,y regardless of checks

pull/8/head
Sara 2023-06-18 16:14:30 +02:00
parent 1df623e669
commit 494dbfedb3
1 changed files with 2 additions and 1 deletions

View File

@ -10,9 +10,10 @@ 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;
}
}
static inline
void normalize(float* xx, float* yy) {