diff --git a/src/include/units/math.h b/src/include/units/math.h index b0d77117..4275c085 100644 --- a/src/include/units/math.h +++ b/src/include/units/math.h @@ -74,14 +74,15 @@ template /** * @brief Computes Euler's raised to the given power * + * @note Such an operation has sense only for a dimensionless quantity. + * * @param q Quantity being the base of the operation * @return Quantity The value of the same quantity type */ -template -[[nodiscard]] inline quantity exp(const quantity& q) +template +[[nodiscard]] inline dimensionless exp(const dimensionless& q) { - using coherent_unit = dimension_unit; - return quantity_cast(quantity(std::exp(quantity_cast(q).count()))); + return quantity_cast(dimensionless(std::exp(quantity_cast(q).count()))); } /**