diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl index 85b9ae73..8a7681c4 100644 --- a/glm/detail/func_common.inl +++ b/glm/detail/func_common.inl @@ -737,11 +737,15 @@ namespace detail return reinterpret_cast&>(const_cast&>(v)); } - template - GLM_FUNC_QUALIFIER genType fma(genType const& a, genType const& b, genType const& c) - { - return a * b + c; - } +# if GLM_HAS_CXX11_STL + using std::fma; +# else + template + GLM_FUNC_QUALIFIER genType fma(genType const& a, genType const& b, genType const& c) + { + return a * b + c; + } +# endif template GLM_FUNC_QUALIFIER genType frexp(genType x, int& exp) diff --git a/readme.md b/readme.md index 8440d5f5..f038fad2 100644 --- a/readme.md +++ b/readme.md @@ -57,6 +57,7 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate) #### Improvements: - Improved Neon support with more functions optimized #950 - Added CMake GLM interface #963 +- Added fma implementation based on std::fma #969 #### Fixes: - Fixed equal ULP variation when using negative sign #965