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

Scale `value` by the unit magnitude passed as `m,` converting to type `To&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&gt;
requires requires(const From&amp; v) &lcub; scaling&lowbar;traits&lt;From, To&gt;&colon;&colon;template scale&lt;M&lcub;&rcub;&gt;(v)&semi; &rcub;
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
constexpr
To
scale(
    M,
    From const& value);
----


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