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
3498e9214f
commit
9247693c63
13 changed files with 159 additions and 67 deletions
|
@ -12,7 +12,7 @@
|
|||
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
|
||||
# include <sprout/math/floor.hpp>
|
||||
#else
|
||||
# include <sprout/math/equal_to.hpp>
|
||||
# include <sprout/math/greater_equal.hpp>
|
||||
#endif
|
||||
|
||||
namespace sprout {
|
||||
|
@ -42,7 +42,7 @@ namespace sprout {
|
|||
template<typename To, typename FloatType>
|
||||
inline SPROUT_CONSTEXPR To
|
||||
ifloor_impl(FloatType x, To x0) {
|
||||
return sprout::math::equal_to(x, x0) ? x0
|
||||
return sprout::math::greater_equal(x, x0) ? x0
|
||||
: x0 - 1
|
||||
;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue