OGLplus  (0.59.0) a C++ wrapper for rendering APIs

amount_of_substance.hpp
Go to the documentation of this file.
1 
9 #ifndef EAGINE_UNITS_UNIT_SI_AMOUNT_OF_SUBSTANCE_HPP
10 #define EAGINE_UNITS_UNIT_SI_AMOUNT_OF_SUBSTANCE_HPP
11 
12 #include "common.hpp"
13 
14 namespace eagine::units {
15 namespace base {
16 
17 // mole
18 struct mole : unit<amount_of_substance, mole> {};
19 
20 } // namespace base
21 
22 template <>
23 struct name_of<base::mole> {
24  static constexpr const char mp_str[] = "mole";
25 };
26 template <>
27 struct symbol_of<base::mole> {
28  static constexpr const char mp_str[] = "mol";
29 };
30 
31 // si::base_unit<amount_of_substance>
32 template <>
33 struct si::base_unit<base::amount_of_substance> : base::mole {};
34 
35 using mole = unit<amount_of_substance, si>;
36 
37 using kilomole =
38  make_scaled_base_dim_unit_t<base::scaled_unit<scales::kilo, base::mole>, si>;
39 
40 } // namespace eagine::units
41 
42 #endif // EAGINE_UNITS_UNIT_SI_AMOUNT_OF_SUBSTANCE_HPP

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).