mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-14 15:04:09 +00:00
add math::copysign
fix hyperbolic and exponental functions: for special values
This commit is contained in:
parent
a27c83e939
commit
32c3ba02d4
50 changed files with 540 additions and 216 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <sprout/math/detail/config.hpp>
|
||||
#include <sprout/math/detail/float_compute.hpp>
|
||||
#include <sprout/math/constants.hpp>
|
||||
#include <sprout/math/copysign.hpp>
|
||||
#include <sprout/math/cos.hpp>
|
||||
#include <sprout/type_traits/enabler_if.hpp>
|
||||
#include <sprout/type_traits/float_promote.hpp>
|
||||
|
@ -32,7 +33,7 @@ namespace sprout {
|
|||
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
|
||||
: std::sin(x)
|
||||
#else
|
||||
: x == 0 ? FloatType(0)
|
||||
: x == 0 ? sprout::math::copysign(FloatType(0), x)
|
||||
: static_cast<FloatType>(sprout::math::detail::sin_impl(static_cast<typename sprout::math::detail::float_compute<FloatType>::type>(x)))
|
||||
#endif
|
||||
;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue