[#mp_units-clamp_to_range-operator_call]
= xref:mp_units.adoc[mp&lowbar;units]::xref:mp_units/clamp_to_range.adoc[clamp&lowbar;to&lowbar;range]::operator()
:relfileprefix: ../../
:mrdocs:

Clamps `v` to &lsqb;`min`, `max`&rsqb;&period;

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;overflow&lowbar;policies&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;xref:mp_units/Quantity-0c.adoc[Quantity] V&gt;
constexpr
V
operator()(V v) const;
----

== Return Value

`v` if it is within bounds, otherwise the nearest boundary

== Parameters

[cols="1,4"]
|===
| Name| Description
| *v*
| the value to clamp
|===


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