|
CELER_CONSTEXPR_FUNCTION auto | celeritas::zero_quantity () noexcept |
| Get a typeless zero quantity.
|
|
CELER_CONSTEXPR_FUNCTION auto | celeritas::max_quantity () noexcept |
| Get a typeless quantitity greater than any other numeric quantity.
|
|
CELER_CONSTEXPR_FUNCTION auto | celeritas::neg_max_quantity () noexcept |
| Get a quantitity less than any other numeric quantity.
|
|
template<class U , class V > |
CELER_CONSTEXPR_FUNCTION void | celeritas::swap (Quantity< U, V > &a, Quantity< U, V > &b) noexcept |
| Swap two Quantities.
|
|
template<class UnitT , class ValueT > |
CELER_CONSTEXPR_FUNCTION auto | celeritas::native_value_from (Quantity< UnitT, ValueT > quant) noexcept |
| Convert the given quantity into the native Celeritas unit system.
|
|
template<class Q , class T > |
CELER_CONSTEXPR_FUNCTION Q | celeritas::native_value_to (T value) noexcept |
| Create a quantity from a value in the Celeritas unit system.
|
|
template<class Q , class SrcUnitT , class ValueT > |
CELER_CONSTEXPR_FUNCTION auto | celeritas::value_as (Quantity< SrcUnitT, ValueT > quant) noexcept -> ValueT |
| Use the value of a Quantity.
|
|
template<class T > |
char const * | celeritas::accessor_unit_label () |
| Get the label for a unit returned from a class accessor.
|
|
template<class Q , class T >
Create a quantity from a value in the Celeritas unit system.
This function can be used for defining a constant for use in another unit system (typically a "natural" unit system for use in physics kernels).
An extra cast may be needed when mixing float
, double
, and celeritas::Constant
.