morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::units::UnitRelation< E > Struct Template Reference

One exact within-dimension conversion ratio between two peer units. More...

#include <quantity.hpp>

Public Attributes

E from {}
 Source unit of the ratio.
E to {}
 Target unit of the ratio.
morph::math::Rational fromTo {}
 Exact ratio: 1 from == fromTo · to. Strictly positive.

Detailed Description

template<typename E>
struct morph::units::UnitRelation< E >

One exact within-dimension conversion ratio between two peer units.

1 unit of from equals fromTo units of to. fromTo must be strictly positive; from and to must differ. Declared in UnitTraits<E>::relations and used in both directions (the reverse multiplies by the reciprocal).

Template Parameters
EThe application's unit enum type.

Definition at line 224 of file quantity.hpp.

Member Data Documentation

◆ from

template<typename E>
E morph::units::UnitRelation< E >::from {}

Source unit of the ratio.

Definition at line 226 of file quantity.hpp.

◆ to

template<typename E>
E morph::units::UnitRelation< E >::to {}

Target unit of the ratio.

Definition at line 229 of file quantity.hpp.

◆ fromTo

template<typename E>
morph::math::Rational morph::units::UnitRelation< E >::fromTo {}

Exact ratio: 1 from == fromTo · to. Strictly positive.

Definition at line 232 of file quantity.hpp.


The documentation for this struct was generated from the following file: