🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
ast::UnitConverter类 参考

#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)
 

Protected 属性

Unit fromUnit_
 
Unit toUnit_
 

详细描述

单位转换器

成员函数说明

◆ convert()

double ast::UnitConverter::convert ( double value) const
inline

转换单位

参数
value待转换的值
返回
转换后的值

◆ getFromUnit()

Unit ast::UnitConverter::getFromUnit ( ) const
inline

获取转换前的单位

返回
转换前的单位

◆ getToUnit()

Unit ast::UnitConverter::getToUnit ( ) const
inline

获取转换后的单位

返回
转换后的单位

该类的文档由以下文件生成: