|
Unit Conversion and Dimensional Analysis Library
2.3.0
A compile-time c++14 unit conversion library
|
Type representing an arbitrary unit. More...
#include <units.h>
Type representing an arbitrary unit.
unit types are used as tags for the conversion function. They are not containers (see unit_t for a container class). Each unit is defined by:
std::ratio defining the conversion factor to the base unit type. (e.g. std::ratio<1,12> for inches to feet)unit or base_unit)std::ratio<-1> for a radians to degrees conversion)std::ratio<32> for a fahrenheit to celsius conversion)Typically, a specific unit, like meters, would be implemented as a type alias of unit, i.e. using meters = unit<std::ratio<1>, units::category::length_unit, or using inches = unit<std::ratio<1,12>, feet>.
| Conversion | std::ratio representing scalar multiplication factor. |
| BaseUnit | Unit type which this unit is derived from. May be a base_unit, or another unit. |
| PiExponent | std::ratio representing the exponent of pi required by the conversion. |
| Translation | std::ratio representing any datum translation required by the conversion. |
1.8.17