mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-14 16:09:06 +07:00
fixed math unittests
This commit is contained in:
@@ -703,7 +703,7 @@ namespace e2d::math
|
||||
|
||||
template < typename T, typename U >
|
||||
std::enable_if_t<
|
||||
std::is_unsigned_v<T> &&
|
||||
std::is_integral_v<T> &&
|
||||
std::is_convertible_v<U,T>,
|
||||
T>
|
||||
align_ceil (T v, U alignment) {
|
||||
@@ -714,7 +714,7 @@ namespace e2d::math
|
||||
|
||||
template < typename T, typename U >
|
||||
std::enable_if_t<
|
||||
std::is_unsigned_v<T> &&
|
||||
std::is_integral_v<T> &&
|
||||
std::is_convertible_v<U,T>,
|
||||
T>
|
||||
align_floor (T v, U alignment) {
|
||||
|
||||
@@ -662,7 +662,7 @@ TEST_CASE("math") {
|
||||
REQUIRE_FALSE(math::approximately<u32>(umax,umin,1));
|
||||
}
|
||||
{
|
||||
REQUIRE(math::align_ceil(11, 4) == 16);
|
||||
REQUIRE(math::align_floor(11, 4) == 8);
|
||||
REQUIRE(math::align_ceil(11, 4) == 12);
|
||||
REQUIRE(math::align_floor(11, 4u) == 8);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user