Specialization of Qty for <0,0,0> with conversions to double. More...
#include <PhysicalQty.h>
Public Types | |
using | Type = Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > > |
Our type. | |
template<long int Num, long int Den> | |
using | Power = Type |
General power type. | |
using | Squared = Type |
The squared type. | |
using | Inverse = Type |
The inverse type. | |
using | Sqrt = Type |
The sqrt type. | |
Public Member Functions | |
constexpr | Qty (ZeroUnit) |
Default constructor to 0. | |
constexpr | Qty (double x=0.0, double factor=1.0) |
Default constructor from a double. | |
template<typename U > | |
constexpr | Qty (const U &q, double factor=1.0, enable_if_same_qty< void, Type, U > *=nullptr) |
Constructor from a compatible quantity. | |
constexpr double | rawValue () const |
Access to the raw value. | |
constexpr | operator double () const |
Cast to double. | |
Type & | operator*= (double x) |
Assignment multiplication by dimensionless number. | |
Type & | operator/= (double x) |
Assignment division by dimensionless number. | |
Type & | operator+= (const Type &x) |
Assignment addition with compatible quantity. | |
Type & | operator-= (const Type &x) |
Assignment subtraction with compatible quantity. | |
Type & | operator+= (double x) |
Assignment addition with double. | |
Type & | operator-= (double x) |
Assignment subtraction with double. | |
Static Public Member Functions | |
static constexpr Type | baseunit () |
Basic unit of this quantity. | |
Private Attributes | |
double | rawValue_ |
The raw value. | |
Specialization of Qty for <0,0,0> with conversions to double.
Definition at line 160 of file PhysicalQty.h.
using ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::Inverse = Type |
The inverse type.
Definition at line 171 of file PhysicalQty.h.
using ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::Power = Type |
General power type.
Definition at line 167 of file PhysicalQty.h.
using ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::Sqrt = Type |
The sqrt type.
Definition at line 173 of file PhysicalQty.h.
using ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::Squared = Type |
The squared type.
Definition at line 169 of file PhysicalQty.h.
using ThePEG::Qty< std::ratio< 0 >, std::ratio< 0 >, std::ratio< 0 > >::Type = Qty<std::ratio<0>,std::ratio<0>,std::ratio<0> > |
Our type.
Definition at line 164 of file PhysicalQty.h.
|
inlineconstexpr |
Default constructor to 0.
Definition at line 182 of file PhysicalQty.h.
|
inlineconstexpr |
Default constructor from a double.
Definition at line 185 of file PhysicalQty.h.
|
inlineconstexpr |
Constructor from a compatible quantity.
Definition at line 190 of file PhysicalQty.h.
|
inlinestaticconstexpr |
Basic unit of this quantity.
Definition at line 177 of file PhysicalQty.h.
|
inlineconstexpr |
Cast to double.
Definition at line 198 of file PhysicalQty.h.
|
inline |
Assignment multiplication by dimensionless number.
Definition at line 201 of file PhysicalQty.h.
|
inline |
Assignment addition with compatible quantity.
Definition at line 207 of file PhysicalQty.h.
References rawValue().
|
inline |
Assignment addition with double.
Definition at line 219 of file PhysicalQty.h.
|
inline |
Assignment subtraction with compatible quantity.
Definition at line 213 of file PhysicalQty.h.
References rawValue().
|
inline |
Assignment subtraction with double.
Definition at line 225 of file PhysicalQty.h.
|
inline |
Assignment division by dimensionless number.
Definition at line 204 of file PhysicalQty.h.
|
inlineconstexpr |
Access to the raw value.
Definition at line 195 of file PhysicalQty.h.
Referenced by operator+=(), and operator-=().
|
private |
The raw value.
Definition at line 232 of file PhysicalQty.h.