mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
fix math functions
This commit is contained in:
parent
5d809ef5c9
commit
fa1d769bdf
76 changed files with 582 additions and 169 deletions
|
@ -18,7 +18,8 @@ namespace sprout {
|
|||
>
|
||||
inline SPROUT_CONSTEXPR FloatType
|
||||
acosh(FloatType x) {
|
||||
return x < 1 ? std::numeric_limits<FloatType>::quiet_NaN()
|
||||
return x == 1 ? FloatType(0)
|
||||
: x < 1 ? std::numeric_limits<FloatType>::quiet_NaN()
|
||||
: x == std::numeric_limits<FloatType>::infinity() ? std::numeric_limits<FloatType>::infinity()
|
||||
: sprout::math::log(x + sprout::math::sqrt(x * x - 1))
|
||||
;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue