diff options
| -rw-r--r-- | src/util/mini_math.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/mini_math.h b/src/util/mini_math.h index 2307087..f847cc1 100644 --- a/src/util/mini_math.h +++ b/src/util/mini_math.h @@ -350,6 +350,7 @@ struct quat { } static quat from_axis(vec3 a, float ang) { + a = a.normalize(); // Normalize axis to prevent scaling artifacts float s = std::sin(ang * 0.5f); return {a.x * s, a.y * s, a.z * s, std::cos(ang * 0.5f)}; } |
