menu
num_remap package
documentation
num_remap.dart
Remap extension
Remap extension
dark_mode
light_mode
Remap
extension
on
num
Methods
isWithinRange
(
num
from
,
num
to
)
→
bool
Returns whether a number is within a given range.
remap
(
num
fromLow
,
num
fromHigh
,
num
toLow
,
num
toHigh
)
→
double
Re-maps a number from one range to another. That is, a value of
fromLow
would get mapped to
toLow
, a value of
fromHigh
to
toHigh
, values in-between to values in-between, etc.
remapAndClamp
(
num
fromLow
,
num
fromHigh
,
num
toLow
,
num
toHigh
)
→
num
Same as
remap
, however the result is being constrained to the range
toLow
-
toHigh
.
num_remap package
documentation
num_remap
Remap extension
num_remap library