xo-unit: minor doc improvements
This commit is contained in:
parent
22dbb5e529
commit
74f36ad374
2 changed files with 6 additions and 1 deletions
|
|
@ -30,7 +30,10 @@ Abstraction tower for *xo-unit* components.
|
|||
- scaled_unit:
|
||||
a unit involving zero or more dimensions, and associated conversion factor.
|
||||
|
||||
- expresses result of arithmetic involving multiple scales.
|
||||
- can express result of arithmetic involving multiple scales,
|
||||
by reporting an outer scalefactor
|
||||
- a scaled unit is 'natural' if its outer scalefactor is 1.
|
||||
- quantities are represented by associating a natural scaled_unit instance
|
||||
- scaled_units are closed under multiplication and division.
|
||||
- multiplication and division commit to a single :code:`basis_unit` for each
|
||||
dimension.
|
||||
|
|
|
|||
|
|
@ -483,6 +483,7 @@ namespace xo {
|
|||
constexpr auto q2 = detail::quantity_util::divide(ms, ms);
|
||||
|
||||
/* proof that q2 is constexpr */
|
||||
static_assert(q2.is_dimensionless());
|
||||
static_assert(q2.scale() == 1.0);
|
||||
static_assert(q2.unit().n_bpu() == 0);
|
||||
static_assert(q2.unit()[0].power() == power_ratio_type(0,1));
|
||||
|
|
@ -490,6 +491,7 @@ namespace xo {
|
|||
constexpr auto q3 = ms / ms;
|
||||
|
||||
/* proof that q3 is constexpr */
|
||||
static_assert(q3.is_dimensionless());
|
||||
static_assert(q3.scale() == 1.0);
|
||||
static_assert(q3.unit().n_bpu() == 0);
|
||||
static_assert(q3.unit()[0].power() == power_ratio_type(0,1));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue