diff --git a/headers/vmath.hpp/vmath_ext.hpp b/headers/vmath.hpp/vmath_ext.hpp index 6906715..19fd3cc 100644 --- a/headers/vmath.hpp/vmath_ext.hpp +++ b/headers/vmath.hpp/vmath_ext.hpp @@ -838,31 +838,6 @@ namespace vmath_hpp return v * qrotate(angle, axis); } - template < typename T > - [[nodiscard]] vec rotate_x(const vec& v, T angle) { - return v * qrotate(angle, unit3_x); - } - - template < typename T > - [[nodiscard]] vec rotate_y(const vec& v, T angle) { - return v * qrotate(angle, unit3_y); - } - - template < typename T > - [[nodiscard]] vec rotate_z(const vec& v, T angle) { - return v * qrotate(angle, unit3_z); - } - - template < typename T > - [[nodiscard]] vec rotate(const vec& v, const qua& q) { - return v * q; - } - - template < typename T > - [[nodiscard]] vec rotate(const vec& v, T angle, const vec& axis) { - return v * qrotate(angle, axis); - } - // project template < typename T, std::size_t Size > diff --git a/headers/vmath.hpp/vmath_qua_fun.hpp b/headers/vmath.hpp/vmath_qua_fun.hpp index 41182cd..28e6cda 100644 --- a/headers/vmath.hpp/vmath_qua_fun.hpp +++ b/headers/vmath.hpp/vmath_qua_fun.hpp @@ -83,11 +83,6 @@ namespace vmath_hpp return xs + qv2 * ys.s + cross(ys.v, qv2); } - template < typename T > - [[nodiscard]] constexpr vec operator*(const vec& xs, const qua& ys) { - return {vec{xs} * ys, xs.w}; - } - template < typename T > [[nodiscard]] constexpr qua operator*(const qua& xs, const qua& ys) { /// REFERENCE: @@ -110,11 +105,6 @@ namespace vmath_hpp return (xs = (xs * ys)); } - template < typename T > - constexpr vec& operator*=(vec& xs, const qua& ys) { - return (xs = (xs * ys)); - } - template < typename T > constexpr qua& operator*=(qua& xs, const qua& ys) { return (xs = (xs * ys)); diff --git a/untests/vmath_ext_tests.cpp b/untests/vmath_ext_tests.cpp index 2cea909..feea51b 100644 --- a/untests/vmath_ext_tests.cpp +++ b/untests/vmath_ext_tests.cpp @@ -324,13 +324,6 @@ TEST_CASE("vmath/ext/vector_transform") { REQUIRE(rotate(float3(1.5f,0.f,0.f), qrotate_z(radians(90.f))) == uapprox3(0.f,1.5f,0.f)); REQUIRE(rotate(float3(1.5f,0.f,0.f), radians(90.f), float3(0,0,1)) == uapprox3(0.f,1.5f,0.f)); - - REQUIRE(rotate_x(float4(0.f,1.5f,0.f,2.f), radians(90.f)) == uapprox4(0.f,0.f,1.5f,2.f)); - REQUIRE(rotate_y(float4(0.f,0.f,1.5f,2.f), radians(90.f)) == uapprox4(1.5f,0.f,0.f,2.f)); - REQUIRE(rotate_z(float4(1.5f,0.f,0.f,2.f), radians(90.f)) == uapprox4(0.f,1.5f,0.f,2.f)); - - REQUIRE(rotate(float4(1.5f,0.f,0.f,2.f), qrotate_z(radians(90.f))) == uapprox4(0.f,1.5f,0.f,2.f)); - REQUIRE(rotate(float4(1.5f,0.f,0.f,2.f), radians(90.f), float3(0,0,1)) == uapprox4(0.f,1.5f,0.f,2.f)); } SUBCASE("project") { diff --git a/untests/vmath_qua_fun_tests.cpp b/untests/vmath_qua_fun_tests.cpp index e3e09a3..5c869e0 100644 --- a/untests/vmath_qua_fun_tests.cpp +++ b/untests/vmath_qua_fun_tests.cpp @@ -58,17 +58,9 @@ TEST_CASE("vmath/qua_fun") { REQUIRE(v == uapprox3(0.f,1.f,0.f)); } - { - float4 v{1,0,0,2}; - REQUIRE(&v == &(v *= fqua{0,0,0.7071067812f,0.7071067812f})); - REQUIRE(v == uapprox4(0.f,1.f,0.f,2.f)); - } - STATIC_REQUIRE(fqua{} * fqua{} == fqua{}); STATIC_REQUIRE(float3{1,2,3} * fqua{} == uapprox3(1.f,2.f,3.f)); - STATIC_REQUIRE(float4{1,2,3,4} * fqua{} == uapprox4(1.f,2.f,3.f,4.f)); STATIC_REQUIRE(float3{1,0,0} * fqua{0,0,0.7071067812f,0.7071067812f} == uapprox3(0.f,1.f,0.f)); - STATIC_REQUIRE(float4{1,0,0,2} * fqua{0,0,0.7071067812f,0.7071067812f} == uapprox4(0.f,1.f,0.f,2.f)); } SUBCASE("Common Functions") {