diff --git a/README.md b/README.md index 6103240..53a0e31 100644 --- a/README.md +++ b/README.md @@ -1006,9 +1006,6 @@ T step(T edge, T x); template < floating_point T > T smoothstep(T edge0, T edge1, T x); - -template < floating_point T > -T fma(T x, T y, T z); ``` #### Vector @@ -1112,9 +1109,6 @@ vec smoothstep(T edge0, T edge1, const vec& xs); template < typename T, size_t Size > vec smoothstep(const vec& edges0, const vec& edges1, const vec& xs); - -template < typename T, size_t Size > -vec fma(const vec& as, const vec& bs, const vec& cs); ``` #### Quaternion diff --git a/headers/vmath.hpp/vmath_fun.hpp b/headers/vmath.hpp/vmath_fun.hpp index e87e262..8da26fc 100644 --- a/headers/vmath.hpp/vmath_fun.hpp +++ b/headers/vmath.hpp/vmath_fun.hpp @@ -138,12 +138,6 @@ namespace vmath_hpp const T t = clamp((x - edge0) * rcp(edge1 - edge0), T{0}, T{1}); return t * t * (T{3} - T{2} * t); } - - template < typename T > - [[nodiscard]] std::enable_if_t, T> - fma(T x, T y, T z) noexcept { - return std::fma(x, y, z); - } } // diff --git a/headers/vmath.hpp/vmath_vec_fun.hpp b/headers/vmath.hpp/vmath_vec_fun.hpp index 9cf110e..69c3c6e 100644 --- a/headers/vmath.hpp/vmath_vec_fun.hpp +++ b/headers/vmath.hpp/vmath_vec_fun.hpp @@ -632,11 +632,6 @@ namespace vmath_hpp [[nodiscard]] constexpr vec smoothstep(const vec& edges0, const vec& edges1, const vec& xs) { return map_join([](T edge0, T edge1, T x) { return smoothstep(edge0, edge1, x); }, edges0, edges1, xs); } - - template < typename T, std::size_t Size > - [[nodiscard]] constexpr vec fma(const vec& as, const vec& bs, const vec& cs) { - return map_join([](T a, T b, T c) { return fma(a, b, c); }, as, bs, cs); - } } // diff --git a/untests/vmath_fix_tests.cpp b/untests/vmath_fix_tests.cpp index 1d0d4ad..1af899d 100644 --- a/untests/vmath_fix_tests.cpp +++ b/untests/vmath_fix_tests.cpp @@ -47,8 +47,6 @@ namespace constexpr friend fix step(const fix& e, const fix& l) { using vmath_hpp::step; return fix{step(e.underlying(), l.underlying())}; } constexpr friend fix smoothstep(const fix& e0, const fix& e1, const fix& l) { using vmath_hpp::smoothstep; return fix{smoothstep(e0.underlying(), e1.underlying(), l.underlying())}; } - constexpr friend fix fma(const fix& x, const fix& y, const fix& z) { using vmath_hpp::fma; return fix{fma(x.underlying(), y.underlying(), z.underlying())}; } - // constexpr friend fix any(const fix& l) { using vmath_hpp::any; return fix{any(l.underlying())}; } @@ -199,8 +197,6 @@ namespace vmath_hpp template fix2f step(const fix2f&, const fix2f&); template fix2f smoothstep(fix, fix, const fix2f&); template fix2f smoothstep(const fix2f&, const fix2f&, const fix2f&); - - template fix2f fma(const fix2f&, const fix2f&, const fix2f&); } namespace vmath_hpp diff --git a/untests/vmath_fun_tests.cpp b/untests/vmath_fun_tests.cpp index 4817f09..9903781 100644 --- a/untests/vmath_fun_tests.cpp +++ b/untests/vmath_fun_tests.cpp @@ -105,8 +105,6 @@ TEST_CASE("vmath/fun") { STATIC_CHECK(step(0.5f, 0.4f) == uapprox(0.f)); STATIC_CHECK(step(0.5f, 0.6f) == uapprox(1.f)); STATIC_CHECK(smoothstep(0.f, 1.f, 0.1f) == uapprox(0.028f)); - - CHECK(fma(2.f, 3.f, 4.f) == uapprox(10.f)); } SUBCASE("Geometric Functions") { diff --git a/untests/vmath_vec_fun_tests.cpp b/untests/vmath_vec_fun_tests.cpp index 31b4915..262f1ec 100644 --- a/untests/vmath_vec_fun_tests.cpp +++ b/untests/vmath_vec_fun_tests.cpp @@ -249,8 +249,6 @@ TEST_CASE("vmath/vec_fun") { STATIC_CHECK(smoothstep(0.f, 1.f, float2(0.1f)) == uapprox2(0.028f)); STATIC_CHECK(smoothstep(float2(0.f), float2(1.f), float2(0.1f)) == uapprox2(0.028f)); - - CHECK_FALSE(fma(float2(2.f), float2(3.f), float2(4.f)).x == uapprox(12.f)); } SUBCASE("Geometric Functions") {