docs: "canonical unit" added to glossary and its documentation in code was updated

This commit is contained in:
Mateusz Pusz
2023-11-04 21:36:03 +01:00
parent 436d288154
commit 162514c19e
2 changed files with 19 additions and 8 deletions

View File

@@ -333,6 +333,20 @@
associated with a specific quantity ([quantity specification](#quantity_spec) and
[unit](#unit)).
[`canonical representation of a unit, canonical unit`](#canonical-unit){ #canonical-unit }
: - A canonical representation of a unit consists of:
- a reference unit being the result of extraction of all the intermediate
[derived units](#derived-unit),
- a magnitude being a product of all the prefixes and magnitudes of extracted scaled units.
- All units having the same canonical unit are deemed equal.
- All units having the same reference unit are convertible
(their magnitude may differ and is used during conversion).
[`reference unit`](#reference-unit){ #reference-unit }
: See [canonical representation of a unit](#canonical-unit)
[`absolute quantity point origin`, `absolute point origin`](#absolute-point-origin){ #absolute-point-origin }
: - An explicit point on an axis of values of a specific [quantity](#quantity) type that serves

View File

@@ -262,16 +262,13 @@ struct is_one<struct one> : std::true_type {};
/**
* @brief A canonical representation of a unit
*
* A canonical representation of a unit consists of a `reference_unit` and its scaling
* factor represented by the magnitude `mag`.
*
* `reference_unit` is a unit (possibly derived one) that consists only named base units.
* All of the intermediate derived units are extracted, prefixes and magnitudes of scaled
* units are stripped from them and accounted in the `mag`.
* A canonical representation of a unit consists of:
* - a reference unit being the result of extraction of all the intermediate derived units,
* - a magnitude being a product of all the prefixes and magnitudes of extracted scaled units.
*
* All units having the same canonical unit are deemed equal.
* All units having the same `reference_unit` are convertible (their `mag` may differ
* and is the subject of conversion).
* All units having the same reference unit are convertible (their magnitude may differ and
* is used during conversion).
*
* @tparam U a unit to use as a `reference_unit`
* @tparam M a Magnitude representing an absolute scaling factor of this unit