Skip to content

mp_units::scale_by_magnitude

scale_by_magnitude overloads

Synopses

Declared in <mp-units/framework/scaling.h>

Scale value by the unit magnitude passed as m, converting to type To.

template<typename To, UnitMagnitude M, typename From>
  requires detail::UnitMagnitudeScalable<From>
[[nodiscard]] constexpr auto scale_by_magnitude(M m, From const& value);

» more...

Scale value by the unit magnitude passed as m, converting to type To, with the result rounded according to policy.

template<typename To, UnitMagnitude M, typename From,
         /* implementation-defined */ Policy>
  requires detail::UnitMagnitudeScalable<From>
[[nodiscard]] constexpr auto scale_by_magnitude(M m, From const& value, Policy);

» more...

Return Value

Note

The return value should not be discarded.