[#mp_units-scale-00]
= xref:mp_units.adoc[mp&lowbar;units]::scale
:relfileprefix: ../
:mrdocs:

Scale `value` by the unit magnitude passed as `m,` converting to type `To,` with the result rounded according to `policy&period;`

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;framework&sol;scaling&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    typename To,
    xref:mp_units/UnitMagnitude.adoc[UnitMagnitude] M,
    typename From,
    xref:mp_units/RoundingPolicy.adoc[RoundingPolicy] Policy&gt;
requires detail&colon;&colon;UnitMagnitudeScalable&lt;From&gt;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
auto
scale(
    M m,
    From const& value,
    Policy);
----

== Return Value

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====

[.small]#Created with https://www.mrdocs.com[MrDocs]#
