34 constexpr T
pi = 3.141592653589793116;
68 template<Unit u,
class Tret = T>
69 constexpr Tret
get() const noexcept {
74 template<
class Tret = T,
class Tu>
80 template<
class Tret = T,
class Tu>
A unit system: the values of the seven SI base units in code units.
A unit system, defined by the SI value of its base units.
The table of physical constants: each constant is a Unit (its SI value and dimension).
namespace containing the units library
constexpr T electron_proton_ratio
Mass ration between the electron and proton.
constexpr T pi
Value of pi Usage : auto pi = shamunits::pi<T>;.
constexpr T fine_structure
Fine structure constant.
constexpr T proton_electron_ratio
Mass ration between the proton and electron.
constexpr Tret get(Unit< Tu > u, int power) const noexcept
get(u) raised to a runtime power: the Python path, Constants(usys).G(power=2)
constexpr Constants(const UnitSystem< T > units)
Construct the shamunits::Constants class with a unit system.
constexpr Tret get(Unit< Tu > u) const noexcept
Value of a constant only known at run time, e.g. get(constants::from_name("G")).
constexpr Tret get() const noexcept
const UnitSystem< T > units
Current unit system of the constants.
A unit: its dimension and its magnitude expressed in SI base units, in precision Tscal.