template<size_t UnitCategory, typename S = std::ratio<1>, int PiPow = 0, typename Tr = std::ratio<0>, int exp = 1>
struct mtcore::units::Unit< UnitCategory, S, PiPow, Tr, exp >
Represents a single unit of measurement.
- Template Parameters
-
UnitCategory | Category of the unit (e.g. Length, Temperature, Time, etc.). Used for tracking dimensions and conversions. |
S | Scale of the unit compared to the base unit. Expressed in a std::ratio as a fraction. |
PiPow | Power of pi for multiplications (1 == x * pi, -1 == x / pi) |
Tr | Translation offset relative to the base unit |
exp | Dimension exponent. Don't set manually, used for internal calculations. |
Definition at line 57 of file units/base.hpp.