mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-01 19:34:29 +02:00
refactor: pow
now uses quantity::one
instead of rep(1)
This commit is contained in:
@@ -56,7 +56,7 @@ template<std::intmax_t Num, std::intmax_t Den = 1, Quantity Q>
|
|||||||
{
|
{
|
||||||
using rep = TYPENAME Q::rep;
|
using rep = TYPENAME Q::rep;
|
||||||
if constexpr (Num == 0) {
|
if constexpr (Num == 0) {
|
||||||
return make_quantity<pow<Num, Den>(Q::reference)>(rep(1));
|
return quantity<pow<Num, Den>(Q::reference), rep>::one();
|
||||||
} else if constexpr (ratio{Num, Den} == 1) {
|
} else if constexpr (ratio{Num, Den} == 1) {
|
||||||
return q;
|
return q;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user