|
ad_physics
|
DataType RatioValue. More...
#include <ad/physics/RatioValue.hpp>
Public Member Functions | |
| RatioValue () | |
| default constructor More... | |
| _AD_PHYSICS_RATIOVALUE_EXPLICIT_CONVERSION_ | RatioValue (double const iRatioValue) |
| standard constructor More... | |
| RatioValue (const RatioValue &other)=default | |
| standard copy constructor | |
| RatioValue (RatioValue &&other)=default | |
| standard move constructor | |
| RatioValue & | operator= (const RatioValue &other)=default |
| standard assignment operator More... | |
| RatioValue & | operator= (RatioValue &&other)=default |
| standard move operator More... | |
| bool | operator== (const RatioValue &other) const |
| standard comparison operator More... | |
| bool | operator!= (const RatioValue &other) const |
| standard comparison operator More... | |
| bool | operator> (const RatioValue &other) const |
| standard comparison operator More... | |
| bool | operator< (const RatioValue &other) const |
| standard comparison operator More... | |
| bool | operator>= (const RatioValue &other) const |
| standard comparison operator More... | |
| bool | operator<= (const RatioValue &other) const |
| standard comparison operator More... | |
| RatioValue | operator+ (const RatioValue &other) const |
| standard arithmetic operator More... | |
| RatioValue & | operator+= (const RatioValue &other) |
| standard arithmetic operator More... | |
| RatioValue | operator- (const RatioValue &other) const |
| standard arithmetic operator More... | |
| RatioValue | operator-= (const RatioValue &other) |
| standard arithmetic operator More... | |
| RatioValue | operator* (const double &scalar) const |
| standard arithmetic operator More... | |
| RatioValue | operator/ (const double &scalar) const |
| standard arithmetic operator More... | |
| double | operator/ (const RatioValue &other) const |
| standard arithmetic operator More... | |
| RatioValue | operator- () const |
| standard arithmetic operator More... | |
| _AD_PHYSICS_RATIOVALUE_EXPLICIT_CONVERSION_ | operator double () const |
| conversion to base type: double More... | |
| bool | isValid () const |
| void | ensureValid () const |
| ensure that the RatioValue is valid More... | |
| void | ensureValidNonZero () const |
| ensure that the RatioValue is valid and non zero More... | |
Static Public Member Functions | |
| static RatioValue | getMin () |
| get minimum valid RatioValue (i.e. cMinValue) | |
| static RatioValue | getMax () |
| get maximum valid RatioValue (i.e. cMaxValue) | |
| static RatioValue | getPrecision () |
| get assumed accuracy of RatioValue (i.e. cPrecisionValue) | |
Static Public Attributes | |
| static const double | cMinValue |
| constant defining the minimum valid RatioValue value (used in isValid()) | |
| static const double | cMaxValue |
| constant defining the maximum valid RatioValue value (used in isValid()) | |
| static const double | cPrecisionValue |
| constant defining the assumed RatioValue value accuracy (used in comparison operator==(), operator!=()) | |
DataType RatioValue.
Defines a general ratio. The unit is: Ratio
|
inline |
default constructor
The default value of RatioValue is: std::numeric_limits<double>::quiet_NaN()
|
inline |
standard constructor
|
inline |
ensure that the RatioValue is valid
Throws an std::out_of_range() exception if the RatioValue in not valid (i.e. isValid() returns false)
|
inline |
ensure that the RatioValue is valid and non zero
Throws an std::out_of_range() exception if the RatioValue in not valid or zero (i.e. isValid() returns false)
|
inline |
true if the RatioValue in a valid rangeAn RatioValue value is defined to be valid if:
|
inline |
conversion to base type: double
|
inline |
standard comparison operator
| [in] | other | Other RatioValue. |
true if one of the RatioValue is not valid or they can be taken as numerically different
|
inline |
standard arithmetic operator
| [in] | scalar | Scalar double value |
value or the result of the operation is not valid
|
inline |
standard arithmetic operator
| [in] | other | Other RatioValue |
|
inline |
standard arithmetic operator
| [in] | other | Other RatioValue |
|
inline |
standard arithmetic operator
|
inline |
standard arithmetic operator
| [in] | other | Other RatioValue |
|
inline |
standard arithmetic operator
| [in] | other | Other RatioValue |
|
inline |
standard arithmetic operator
| [in] | scalar | Scalar double value |
|
inline |
standard arithmetic operator
| [in] | other | Other RatioValue |
|
inline |
standard comparison operator
| [in] | other | Other RatioValue. |
true if both RatioValue are valid and this RatioValue is strictly numerically smaller than other.
|
inline |
standard comparison operator
| [in] | other | Other RatioValue |
true if both RatioValue are valid and this RatioValue is numerically smaller than other.
|
default |
standard assignment operator
| [in] | other | Other RatioValue |
|
default |
|
inline |
standard comparison operator
| [in] | other | Other RatioValue |
true if both RatioValue are valid and can be taken as numerically equal
|
inline |
standard comparison operator
| [in] | other | Other RatioValue. |
true if both RatioValue are valid and this RatioValue is strictly numerically greater than other.
|
inline |
standard comparison operator
| [in] | other | Other RatioValue. |
true if both RatioValue are valid and this RatioValue is numerically greater than other.
1.8.17