1
0
Fork 0
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:
bolero-MURAKAMI 2013-05-08 01:46:40 +09:00
parent 3498e9214f
commit 9247693c63
13 changed files with 159 additions and 67 deletions

View file

@ -12,7 +12,7 @@
#if SPROUT_USE_BUILTIN_CMATH_FUNCTION
# include <sprout/math/ceil.hpp>
#else
# include <sprout/math/equal_to.hpp>
# include <sprout/math/less_equal.hpp>
#endif
namespace sprout {
@ -42,7 +42,7 @@ namespace sprout {
template<typename To, typename FloatType>
inline SPROUT_CONSTEXPR To
iceil_impl(FloatType x, To x0) {
return sprout::math::equal_to(x, x0) ? x0
return sprout::math::less_equal(x, x0) ? x0
: x0 + 1
;
}