linearly v0.32.0 • Docs
linearly v0.32.0 / scalar / fit
Function: fit()
fit(
value
,omin
,omax
,nmin
,nmax
):number
Takes the value in the range (omin, omax)
and shifts it to the corresponding value in the new range (nmin, nmax)
. The function clamps the given value the range (omin, omax)
before fitting, so the resulting value will be guaranteed to be in the range (nmin, nmax)
. To avoid clamping use efit instead. If omin
and omax
are the same, the function returns the average of nmin
and nmax
.
Parameters
• value: number
• omin: number
• omax: number
• nmin: number
• nmax: number
Returns
number
See
https://www.sidefx.com/docs/houdini/vex/functions/fit.html