refactor: 💥 make_xxx factory functions replaced with two-parameter constructors

Resolves #521
This commit is contained in:
Mateusz Pusz
2023-11-28 11:52:37 +01:00
parent 80129b32d7
commit fa596fffc6
12 changed files with 143 additions and 175 deletions
@@ -102,11 +102,11 @@ quantity_point qp3 = mean_sea_level - 42 * m;
Similarly to [creation of a quantity](../../getting_started/quick_start.md#creating-a-quantity),
if someone does not like the operator-based syntax to create a `quantity_point`, the same results
can be achieved with `make_quantity_point` factory function:
can be achieved with two-parameter constructor:
```cpp
quantity_point qp4 = make_quantity_point<mean_sea_level>(42 * m);
quantity_point qp5 = make_quantity_point<mean_sea_level>(-42 * m);
quantity_point qp4{42 * m, mean_sea_level};
quantity_point qp5{-42 * m, mean_sea_level};
```
The provided `quantity` representing an offset from the origin is stored inside the `quantity_point`