linearly v0.32.0Docs


linearly v0.32.0 / vec3 / fit

Function: fit()

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

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: vec3

omin: vec3

omax: vec3

nmin: vec3

nmax: vec3

Returns

vec3

See

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

Defined in

src/vec3.ts:485open in new window