mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
mx::astro::units::cgs< _realT > Struct Template Reference

template<typename _realT>
struct mx::astro::units::cgs< _realT >

Centimeter-Gram-Second (cgs) units-type.

The units are:

  • Length: centimeter (cm)
  • Time: second (s)
  • Mass: gram (g)
  • Energy: erg (erg)
  • Temperature: Kelvin (K)

Definition at line 55 of file units.hpp.

#include <astro/units.hpp>

Public Types

typedef _realT realT
 The real floating point type in which to specify constants. More...
 

Static Public Attributes

static constexpr realT length = static_cast<realT>(100.0)
 Conversion from SI (m) to cgs (cm) More...
 
static constexpr realT time = static_cast<realT>(1.0)
 Conversion from SI (s) to cgs (s) More...
 
static constexpr realT mass = static_cast<realT>(1000.0)
 Conversion from SI (kg) to cgs (g) More...
 
static constexpr realT energy = static_cast<realT>(1e7)
 Conversion from SI (J) to cgs (erg) More...
 
static constexpr realT temperature = static_cast<realT>(1.0)
 Conversion from SI (K) to cgs (K) More...
 

Member Typedef Documentation

◆ realT

template<typename _realT >
typedef _realT mx::astro::units::cgs< _realT >::realT

The real floating point type in which to specify constants.

Definition at line 57 of file units.hpp.

Member Data Documentation

◆ energy

template<typename _realT >
constexpr realT mx::astro::units::cgs< _realT >::energy = static_cast<realT>(1e7)
staticconstexpr

Conversion from SI (J) to cgs (erg)

Definition at line 61 of file units.hpp.

◆ length

template<typename _realT >
constexpr realT mx::astro::units::cgs< _realT >::length = static_cast<realT>(100.0)
staticconstexpr

Conversion from SI (m) to cgs (cm)

Definition at line 58 of file units.hpp.

◆ mass

template<typename _realT >
constexpr realT mx::astro::units::cgs< _realT >::mass = static_cast<realT>(1000.0)
staticconstexpr

Conversion from SI (kg) to cgs (g)

Definition at line 60 of file units.hpp.

◆ temperature

template<typename _realT >
constexpr realT mx::astro::units::cgs< _realT >::temperature = static_cast<realT>(1.0)
staticconstexpr

Conversion from SI (K) to cgs (K)

Definition at line 62 of file units.hpp.

◆ time

template<typename _realT >
constexpr realT mx::astro::units::cgs< _realT >::time = static_cast<realT>(1.0)
staticconstexpr

Conversion from SI (s) to cgs (s)

Definition at line 59 of file units.hpp.


The documentation for this struct was generated from the following file: