【问题标题】:Electron volts with boost::units?带有 boost::units 的电子伏特?
【发布时间】:2017-11-11 10:17:37
【问题描述】:

boost::units 是否可以选择以电子伏特 (eV) 表示能量?我似乎找不到合适的头文件

【问题讨论】:

  • 它还不存在。虽然有些在网络上漂浮

标签: c++ boost boost-units


【解决方案1】:

有点晚了,但你可以得到它:

boost::units::quantity<boost::units::si::energy> electronvolt 
   = 1. * boost::units::si::volt * boost::units::si::constants::codata::e;

(但是,这不是用户要问的:不,Boost.Units 不支持电子伏特)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-07-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-05
    • 2013-12-01
    • 1970-01-01
    相关资源
    最近更新 更多