numerical_value_in overloads
Declared in <mp-units/framework/quantity.h>
Returns the numerical value converted to another unit implicitly convertible to rep.
template<UnitOf<quantity_spec> U>
requires detail::ImplicitScaling<unit, U{}, rep>
[[nodiscard]]
constexpr
RepresentationOf<quantity_spec> auto
numerical_value_in(U u) const noexcept;
» more...
Returns the numerical value converted to another unit, applying an explicit rounding policy.
template<
UnitOf<quantity_spec> U,
RoundingPolicy Policy>
requires detail::ExplicitlyCastable<unit, U{}, rep> && detail::ValidRoundingPolicyFor<Policy, rep, rep>
[[nodiscard]]
constexpr
RepresentationOf<quantity_spec> auto
numerical_value_in(
U u,
Policy policy) const noexcept;
» more...
| Name | Description |
|---|---|
| u | the target unit |
| policy | the rounding policy to apply when the conversion is not exact |