mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-14 15:04:09 +00:00
fix math functions
This commit is contained in:
parent
5d809ef5c9
commit
fa1d769bdf
76 changed files with 582 additions and 169 deletions
|
@ -1,6 +1,7 @@
|
|||
#ifndef SPROUT_MATH_FMIN_HPP
|
||||
#define SPROUT_MATH_FMIN_HPP
|
||||
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
#include <sprout/config.hpp>
|
||||
#include <sprout/math/detail/config.hpp>
|
||||
|
@ -16,7 +17,7 @@ namespace sprout {
|
|||
>
|
||||
inline SPROUT_CONSTEXPR FloatType
|
||||
fmin(FloatType x, FloatType y) {
|
||||
return x > y ? y : x;
|
||||
return x > y && !y == std::numeric_limits<FloatType>::quiet_NaN() ? y : x;
|
||||
}
|
||||
|
||||
template<
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue