|
🛰️航天仿真算法库 SpaceAST 0.0.1
|
#include <UnitConverter.hpp>
Public 成员函数 | |
| UnitConverter (Unit fromUnit, Unit toUnit) | |
| double | convert (double value) const |
| Unit | getFromUnit () const |
| Unit | getToUnit () const |
| void | setFromUnit (Unit fromUnit) |
| void | setToUnit (Unit toUnit) |
| double | getConversionFactor () const |
Protected 成员函数 | |
| void | syncConversionFactor () |
Protected 属性 | |
| Unit | fromUnit_ |
| Unit | toUnit_ |
| double | conversionFactor_ |
单位转换器
|
inline |
转换单位
| value | 待转换的值 |
|
inline |
获取转换因子
|
inline |
获取转换前的单位
|
inline |
获取转换后的单位