1
0
Fork 0
mirror of https://github.com/bolero-MURAKAMI/Sprout synced 2025-08-03 12:49:50 +00:00

add floor, ceil, trunc, round

This commit is contained in:
bolero-MURAKAMI 2012-07-05 00:09:44 +09:00
parent c6fb8af0c5
commit 77f058a34c
12 changed files with 236 additions and 11 deletions

View file

@ -3,8 +3,8 @@
#include <cstddef>
#include <cstdint>
#include <cmath>
#include <sprout/config.hpp>
#include <sprout/math/floor.hpp>
#include <sprout/utility/value_holder.hpp>
#include <sprout/darkroom/colors/rgb.hpp>
@ -121,7 +121,7 @@ namespace sprout {
}
template<typename Unit>
SPROUT_CONSTEXPR result_type calc_bilinear(Unit const& x, Unit const& y) const {
using std::floor;
using sprout::floor;
return calc_bilinear_1(x, floor(x - 0.5), floor(x + 0.5), y, floor(y - 0.5), floor(y + 0.5));
}
template<typename Unit>