vec: more strongly hint on generating fsrra instructions

This commit is contained in:
Zack Buhman 2025-07-21 16:35:47 -05:00
parent 9585f66637
commit e691956223

View File

@ -18,7 +18,8 @@ inline constexpr T magnitude_squared(vec<L, T> const& v)
template <int L, typename T> template <int L, typename T>
inline constexpr vec<3, T> normalize(vec<L, T> const& v) inline constexpr vec<3, T> normalize(vec<L, T> const& v)
{ {
return v / magnitude(v); T d = 1.0f / magnitude(v);
return v * d;
} }
template <int L, typename T> template <int L, typename T>