Returns the numerical value of this quantity point on the scale of another unit, applying an explicit rounding policy.
Synopsis
Declared in <mp‐units/framework/quantity_point.h>
template<
UnitOf<quantity_spec> U,
RoundingPolicy Policy>
requires (PO == default_point_origin®) && 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;
Description
Only available when point_origin is the default point origin for R.
Return Value
The numerical value expressed in u, measured from the default point origin.
|
Note
|
The return value should not be discarded. |
Parameters
Name |
Description |
u |
the target unit |
policy |
the rounding policy to apply when the conversion is not exact |
Created with MrDocs