17 lines
289 B
C++
Executable File
17 lines
289 B
C++
Executable File
#ifndef UNITS_H
|
|
#define UNITS_H
|
|
|
|
class Units {
|
|
|
|
public:
|
|
|
|
/** convert from m to cm */
|
|
template <typename T> static inline T mToCm(const T m) {return m * 100;}
|
|
|
|
/** convert from cm to m */
|
|
template <typename T> static inline T cmToM(const T cm) {return cm / 100;}
|
|
|
|
};
|
|
|
|
#endif // UNITS_H
|