mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-05 21:24:27 +02:00
fix: exp()
implementation fixed
This commit is contained in:
@@ -106,7 +106,7 @@ template<Quantity Q>
|
||||
* @param q Quantity being the base of the operation
|
||||
* @return Quantity The value of the same quantity type
|
||||
*/
|
||||
template<quantity_of<dimensionless> Q, typename Rep>
|
||||
template<weak_quantity_of<dimensionless> Q>
|
||||
[[nodiscard]] inline Q exp(const Q& q)
|
||||
requires requires { exp(q.number()); } || requires { std::exp(q.number()); }
|
||||
{
|
||||
|
@@ -66,6 +66,8 @@ TEST_CASE("'pow<Num, Den>()' on quantity changes the value and the dimension acc
|
||||
REQUIRE(pow<1, 4>(16 * isq::area[m2]) == sqrt(4 * isq::length[m]));
|
||||
}
|
||||
|
||||
// TODO add tests for exp()
|
||||
|
||||
TEST_CASE("absolute functions on quantity returns the absolute value", "[math][abs][fabs]")
|
||||
{
|
||||
SECTION("'abs()' on a negative quantity returns the abs")
|
||||
|
Reference in New Issue
Block a user