2 #ifndef SYDEVS_UNITS_H_
3 #define SYDEVS_UNITS_H_
78 template<
int64 g,
int64 m,
int64 s,
int64 A,
int64 K,
int64 mol,
int64 cd>
81 constexpr
units() =
default;
97 template<
int64 g_,
int64 m_,
int64 s_,
int64 A_,
int64 K_,
int64 mol_,
int64 cd_>
98 constexpr
units<g + g_, m + m_, s + s_, A + A_, K + K_, mol + mol_, cd + cd_> operator*(
units<g_, m_, s_, A_, K_, mol_, cd_> rhs)
const
107 template<
int64 g_,
int64 m_,
int64 s_,
int64 A_,
int64 K_,
int64 mol_,
int64 cd_>
108 constexpr
units<g -
g_, m -
m_, s -
s_, A -
A_, K -
K_, mol -
mol_, cd -
cd_>
operator/(
units<g_, m_, s_, A_, K_, mol_, cd_> rhs)
const
Kelvins exponent.
Definition: units.h:88
Moles exponent.
Definition: units.h:89
units< 0, 0, 0, 0, 0, 0, 0 > no_units
Definition: units.h:115
units< 0, 0, 0, 0, 0, 0, 1 > candelas
Definition: units.h:122
constexpr auto _cd
Definition: units.h:132
constexpr units< g-g_, m-m_, s-s_, A-A_, K-K_, mol-mol_, cd-cd_ > operator/(units< g_, m_, s_, A_, K_, mol_, cd_ > rhs) const
Combines two units into one as if the unit on the left were divided by that on the right...
Definition: units.h:108
constexpr auto _mol
Definition: units.h:131
units< 0, 0, 1, 0, 0, 0, 0 > seconds
Definition: units.h:118
constexpr auto _g
Definition: units.h:126
Meters exponent.
Definition: units.h:85
constexpr units< g+g_, m+m_, s+s_, A+A_, K+K_, mol+mol_, cd+cd_ > operator*(units< g_, m_, s_, A_, K_, mol_, cd_ > rhs) const
Combines two units into one as if the unit on the left were multiplied by that on the right...
Definition: units.h:98
constexpr auto _s
Definition: units.h:128
constexpr auto _K
Definition: units.h:130
units< 0, 0, 0, 1, 0, 0, 0 > amperes
Definition: units.h:119
Grams exponent.
Definition: units.h:84
constexpr auto _A
Definition: units.h:129
constexpr units()=default
Constructs a unit object.
units< 0, 0, 0, 0, 0, 1, 0 > moles
Definition: units.h:121
Seconds exponent.
Definition: units.h:86
A template which represents Standard International (SI) units inclusing the base units such as grams...
Definition: units.h:79
units< 0, 0, 0, 0, 1, 0, 0 > kelvins
Definition: units.h:120
Amperes exponent.
Definition: units.h:87
constexpr auto _m
Definition: units.h:127
Candelas exponent.
Definition: units.h:90
units< 1, 0, 0, 0, 0, 0, 0 > grams
Definition: units.h:116
units< 0, 1, 0, 0, 0, 0, 0 > meters
Definition: units.h:117
constexpr auto _1
Definition: units.h:125