30 #ifndef CARMA_SERVICES_UNITS_H
31 #define CARMA_SERVICES_UNITS_H
73 double convert(
const char * convertFrom,
74 const char * convertTo)
const;
76 double convert(
const std::string& convertFrom,
77 const std::string& convertTo)
const;
90 const char * convertFrom,
91 const char * convertTo)
const;
94 const std::string& convertFrom,
95 const std::string& convertTo)
const;
97 template <
typename T >
99 ::std::numeric_limits< T > limit;
101 return static_cast< int >(floor(0.5 +log10(1/limit.epsilon())));
142 bool reciprocalHoldingMasterLock(
143 struct unittype * fromUnit,
144 struct unittype * toUnit,
145 struct unittype * inverseFromUnit)
const;
150 #endif //CARMA_SERVICES_UNITS_H
double deca() const
times ten
double kilo() const
times one thousand
virtual ~Units()
Destructor.
double centi() const
times one hundredth
double mega() const
times one million
double milli() const
times one thousandth
double micro() const
times one million
double tera() const
times one trillion
double deci() const
times one tenth
double hecto() const
times one hundred
double convert(const char *convertFrom, const char *convertTo) const
Convert value and units to new units.
double pico() const
times one trillionth
double giga() const
times one billion
double nano() const
times one billionth
This class is based on the GNU units library.