From e6919562233d75195b7212ba021fe7a81c35cb48 Mon Sep 17 00:00:00 2001 From: Zack Buhman Date: Mon, 21 Jul 2025 16:35:47 -0500 Subject: [PATCH] vec: more strongly hint on generating fsrra instructions --- math/vec.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/math/vec.hpp b/math/vec.hpp index 930fe10..279f454 100644 --- a/math/vec.hpp +++ b/math/vec.hpp @@ -18,7 +18,8 @@ inline constexpr T magnitude_squared(vec const& v) template inline constexpr vec<3, T> normalize(vec const& v) { - return v / magnitude(v); + T d = 1.0f / magnitude(v); + return v * d; } template