feat: std::numeric_limits support added

Resolves #408
This commit is contained in:
Mateusz Pusz
2025-02-05 18:04:43 +01:00
parent b8855dc7ba
commit 88439828a5
7 changed files with 348 additions and 16 deletions

View File

@@ -145,20 +145,6 @@ TEST_CASE("math operations", "[math]")
}
}
SECTION("numeric_limits functions")
{
SECTION("'epsilon' works as expected using default floating type")
{
REQUIRE(epsilon<double>(isq::length[m]).numerical_value_in(m) ==
std::numeric_limits<decltype(1. * isq::length[m])::rep>::epsilon());
}
SECTION("'epsilon' works as expected using integers")
{
REQUIRE(epsilon<int>(isq::length[m]).numerical_value_in(m) ==
std::numeric_limits<decltype(1 * isq::length[m])::rep>::epsilon());
}
}
SECTION("floor functions")
{
SECTION("floor 1 second with target unit second should be 1 second")