Skip to main content

remap

remap(source_first, source_second, target_first, target_second, value) ⇒ number

Returns linear remapping of value from source range [source_first, source_second] to target range [target_first, target_second] This method is non-clamping, meaning that if your input is outside the source range - output will be outside the target range as well

Kind: global function

ParamType
source_firstnumber
source_secondnumber
target_firstnumber
target_secondnumber
valuenumber