mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 04:31:47 +00:00
Added fma implementation based on std::fma #969
This commit is contained in:
parent
338bdead48
commit
95b1cdbbfe
@ -737,11 +737,15 @@ namespace detail
|
|||||||
return reinterpret_cast<vec<L, float, Q>&>(const_cast<vec<L, uint, Q>&>(v));
|
return reinterpret_cast<vec<L, float, Q>&>(const_cast<vec<L, uint, Q>&>(v));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# if GLM_HAS_CXX11_STL
|
||||||
|
using std::fma;
|
||||||
|
# else
|
||||||
template<typename genType>
|
template<typename genType>
|
||||||
GLM_FUNC_QUALIFIER genType fma(genType const& a, genType const& b, genType const& c)
|
GLM_FUNC_QUALIFIER genType fma(genType const& a, genType const& b, genType const& c)
|
||||||
{
|
{
|
||||||
return a * b + c;
|
return a * b + c;
|
||||||
}
|
}
|
||||||
|
# endif
|
||||||
|
|
||||||
template<typename genType>
|
template<typename genType>
|
||||||
GLM_FUNC_QUALIFIER genType frexp(genType x, int& exp)
|
GLM_FUNC_QUALIFIER genType frexp(genType x, int& exp)
|
||||||
|
@ -57,6 +57,7 @@ glm::mat4 camera(float Translate, glm::vec2 const& Rotate)
|
|||||||
#### Improvements:
|
#### Improvements:
|
||||||
- Improved Neon support with more functions optimized #950
|
- Improved Neon support with more functions optimized #950
|
||||||
- Added CMake GLM interface #963
|
- Added CMake GLM interface #963
|
||||||
|
- Added fma implementation based on std::fma #969
|
||||||
|
|
||||||
#### Fixes:
|
#### Fixes:
|
||||||
- Fixed equal ULP variation when using negative sign #965
|
- Fixed equal ULP variation when using negative sign #965
|
||||||
|
Loading…
Reference in New Issue
Block a user