refactor: ipow10() and fpow10() removed as they are no longer used

Resolves #311
This commit is contained in:
Mateusz Pusz
2022-08-31 10:44:12 +02:00
parent d4f1e93d6c
commit 1b9cd8446c

View File

@@ -27,37 +27,6 @@
namespace units::detail {
constexpr std::intmax_t ipow10(std::intmax_t exp)
{
assert(exp >= 0);
if (exp == 0) return 1;
std::intmax_t result = 1;
while (exp > 0) {
result *= 10;
--exp;
}
return result;
}
template<typename Rep>
constexpr Rep fpow10(std::intmax_t exp)
{
if (exp == 0) return Rep(1.0);
Rep result = Rep(1.0);
if (exp < 0) {
while (exp < 0) {
result = result / Rep(10.0);
++exp;
}
} else {
while (exp > 0) {
result = result * Rep(10.0);
--exp;
}
}
return result;
}
template<std::intmax_t N, typename T>
constexpr T pow_impl(const T& v) noexcept
{