refactor: number() and number_in() renamed to value() and value_in()
Resolves #423
This commit is contained in:
1 parent
ae92b49775
commit
a9204e2473
21 files changed
+349
-351
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user