refactor: number() and number_in() renamed to value() and value_in()

Resolves #423
This commit is contained in:
Mateusz Pusz
2023-08-23 17:15:32 +02:00
parent ae92b49775
commit a9204e2473
21 changed files with 349 additions and 351 deletions
+2 -2
View File
@@ -75,14 +75,14 @@ template<Unit auto From, Unit auto To>
template<ReferenceOf<currency> auto To, ReferenceOf<currency> auto From, typename Rep>
quantity<To, Rep> exchange_to(quantity<From, Rep> q)
{
return static_cast<Rep>(exchange_rate<q.unit, get_unit(To)>() * q.number()) * To;
return static_cast<Rep>(exchange_rate<q.unit, get_unit(To)>() * q.value()) * To;
}
template<ReferenceOf<currency> auto To, ReferenceOf<currency> auto From, auto PO, typename Rep>
quantity_point<To, PO, Rep> exchange_to(quantity_point<From, PO, Rep> q)
{
return quantity_point{
zero + static_cast<Rep>(exchange_rate<q.unit, get_unit(To)>() * (q - q.absolute_point_origin).number()) * To};
zero + static_cast<Rep>(exchange_rate<q.unit, get_unit(To)>() * (q - q.absolute_point_origin).value()) * To};
}
int main()