diff --git a/math/vec.hpp b/math/vec.hpp index 279f454..83699a6 100644 --- a/math/vec.hpp +++ b/math/vec.hpp @@ -16,7 +16,7 @@ inline constexpr T magnitude_squared(vec const& v) } template -inline constexpr vec<3, T> normalize(vec const& v) +inline constexpr vec normalize(vec const& v) { T d = 1.0f / magnitude(v); return v * d; diff --git a/math/vec2.hpp b/math/vec2.hpp index a7f6ea7..dfda265 100644 --- a/math/vec2.hpp +++ b/math/vec2.hpp @@ -153,9 +153,3 @@ inline constexpr vec<2, U> functor1(U (&func) (T const& x), vec<2, T> const& v) { return vec<2, U>(func(v.x), func(v.y)); } - -template -inline constexpr T magnitude(vec<2, T> const& v) -{ - return sqrt(dot(v, v)); -} diff --git a/math/vec4.hpp b/math/vec4.hpp index 7375e7c..f0ddb0a 100644 --- a/math/vec4.hpp +++ b/math/vec4.hpp @@ -163,9 +163,3 @@ inline constexpr vec<4, U> functor1(U (&func) (T const& x), vec<4, T> const& v) { return vec<4, U>(func(v.x), func(v.y), func(v.z), func(v.w)); } - -template -inline constexpr T magnitude(vec<4, T> const& v) -{ - return sqrt(dot(v, v)); -}