mirror of
https://github.com/bolero-MURAKAMI/Sprout
synced 2025-08-03 12:49:50 +00:00
add sprout::cbrt, hypot, fmax, fmin, fdim
fix sprout::pow case x==0
This commit is contained in:
parent
feba220da4
commit
6ccd6e1cf4
10 changed files with 273 additions and 17 deletions
|
@ -21,7 +21,9 @@ namespace sprout {
|
|||
>
|
||||
inline SPROUT_CONSTEXPR FloatType
|
||||
pow(FloatType x, FloatType y) {
|
||||
return sprout::math::detail::exp(y * sprout::math::detail::log(x));
|
||||
return x == 0 && y > 0 ? FloatType(0)
|
||||
: sprout::math::detail::exp(y * sprout::math::detail::log(x))
|
||||
;
|
||||
}
|
||||
|
||||
template<
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue