clamp_magnitude no longer outputs input x,y regardless of checks
parent
1df623e669
commit
494dbfedb3
|
@ -10,9 +10,10 @@ void clamp_magnitude(float* xx, float* yy, float max_magnitude) {
|
||||||
if(m > max_magnitude) {
|
if(m > max_magnitude) {
|
||||||
x /= m; y /= m;
|
x /= m; y /= m;
|
||||||
x *= max_magnitude; y *= max_magnitude;
|
x *= max_magnitude; y *= max_magnitude;
|
||||||
}
|
} else {
|
||||||
*xx = x; *yy = y;
|
*xx = x; *yy = y;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static inline
|
static inline
|
||||||
void normalize(float* xx, float* yy) {
|
void normalize(float* xx, float* yy) {
|
||||||
|
|
Loading…
Reference in New Issue