This is the non derivative equivalent to PartialDerivative. This associates a dimension with a value and, if that value can be determined at compile time, can be decomposed to a transparent double through .value()
More...
#include <quantities.hpp>
template<PhysicalQuantityType Quantity>
class serif::dimensions::QuantityValue< Quantity >
This is the non derivative equivalent to PartialDerivative. This associates a dimension with a value and, if that value can be determined at compile time, can be decomposed to a transparent double through .value()
- Template Parameters
-
◆ QuantityValue()
template<PhysicalQuantityType Quantity>
|
|
inlineexplicitconstexprnoexcept |
◆ value()
template<PhysicalQuantityType Quantity>
|
|
inlinenodiscardconstexprnoexcept |
◆ operator* [1/2]
template<PhysicalQuantityType Quantity>
template<IsNumeric Scalar>
@breif Overload of the * operator for a left quantity and some right numeric, scalar, value.
- Template Parameters
-
| Scalar | A value satisfying IsNumeric |
- Parameters
-
| lhs | some quantity value |
| rhs | some scalar value |
- Returns
- some quantity value with the same type as lhs but with value = lhs.m_value * scalar
◆ operator* [2/2]
template<PhysicalQuantityType Quantity>
template<IsNumeric Scalar>
@breif Overload of the * operator for a right quantity and some left numeric, scalar, value.
- Template Parameters
-
| Scalar | A value satisfying IsNumeric |
- Parameters
-
| lhs | some scalar value |
| rhs | some quantity value |
- Returns
- some quantity value with the same type as lhs but with value = scalar * lhs.m_value
◆ operator+
template<PhysicalQuantityType Quantity>
@breif overload of + operator for two quantities with the same PhysicalQuantityType
- Parameters
-
| lhs | One Quantity |
| rhs | Other Quantity |
- Returns
- a new quantity with the same PhysicalQuantityType but with a value = lhs.m_value + rhs.m_value
◆ operator-
template<PhysicalQuantityType Quantity>
@breif overload of - operator for two quantities with the same PhysicalQuantityType
- Parameters
-
| lhs | One Quantity |
| rhs | Other Quantity |
- Returns
- a new quantity with the same PhysicalQuantityType but with a value = lhs.m_value - rhs.m_value
◆ operator/
template<PhysicalQuantityType Quantity>
template<IsNumeric Scalar>
@breif Overload of the / operator for a left quantity and some right numeric, scalar, value.
- Template Parameters
-
| Scalar | A value satisfying IsNumeric |
- Parameters
-
| lhs | some quantity value |
| rhs | some scalar value |
- Returns
- some quantity value with the same type as lhs but with value = lhs.m_value / scalar
◆ operator<=> [1/3]
template<PhysicalQuantityType Quantity>
@breif partial ordering overload to compare two quantity values of the same type
- Parameters
-
| lhs | Some quantity value |
| rhs | Other quantity value |
- Returns
- the partial ordering of lhs.m_value <=> rhs.m_value
◆ operator<=> [2/3]
template<PhysicalQuantityType Quantity>
template<IsNumeric Scalar>
| std::partial_ordering operator<=> |
( |
const QuantityValue< Quantity > & | lhs, |
|
|
const Scalar | rhs ) |
|
friend |
@breif Partial ordering overload for some left quantity and right scalar
- Template Parameters
-
| Scalar | A value satisfying IsNumeric |
- Parameters
-
| lhs | some quantity value |
| rhs | some scalar value |
- Returns
- The partial ordering comparing lhs.m_value to scalar
◆ operator<=> [3/3]
template<PhysicalQuantityType Quantity>
template<IsNumeric Scalar>
| std::partial_ordering operator<=> |
( |
const Scalar | lhs, |
|
|
const QuantityValue< Quantity > & | rhs ) |
|
friend |
@breif Partial ordering overload for some right quantity and left scalar
- Template Parameters
-
| Scalar | A value satisfying IsNumeric |
- Parameters
-
| lhs | some scalar value |
| rhs | some quantity value |
- Returns
- The partial ordering comparing scalar to lhs.m_value
◆ operator==
template<PhysicalQuantityType Quantity>
@breif Default comparison operator for two QuantityValues. Note that there is an implicit requirement these be of the same specialization. E.g. each have the same PhysicalQuantityType Quantity type parameter. Because this is the default and this class has only one trivially comparable member this just checks if m_value == m_value.
- Returns
- true if the values in both are equal.
◆ m_value
template<PhysicalQuantityType Quantity>
The documentation for this class was generated from the following file: