linearly v0.32.0Docs


linearly v0.32.0 / vec2 / fit

Function: fit()

fit(value, omin, omax, nmin, nmax): vec2

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.

Parameters

value: vec2

omin: vec2

omax: vec2

nmin: vec2

nmax: vec2

Returns

vec2

See

https://www.sidefx.com/docs/houdini/vex/functions/fit.htmlopen in new window

Defined in

src/vec2.ts:502open in new window