[#mp_units-is_integral_scaling]
= xref:mp_units.adoc[mp&lowbar;units]::is&lowbar;integral&lowbar;scaling
:relfileprefix: ../
:mrdocs:

Returns `true` if the scaling factor from `from` to `to` is an exact positive integer&period;

== Synopsis

Declared in `&lt;mp&hyphen;units&sol;framework&sol;value&lowbar;cast&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
consteval
bool
is&lowbar;integral&lowbar;scaling(
    auto from,
    auto to);
----

== Description

This is the key predicate used by the default `implicitly&lowbar;scalable` to decide whether conversions between integer&hyphen;like representation types are non&hyphen;truncating (and therefore may be implicit)&period; For example, `m → mm` has an integral factor (×1000), so integer conversions in that direction are implicit&semi; `mm → m` has a fractional factor (÷1000), so they are explicit&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *from*
| source unit
| *to*
| target unit
|===


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