fit VEX function

Takes the value in the range (omin, omax) and shifts it to the corresponding value in the new range (nmin, nmax).

Contexts: image3d, chop, cop, pop, sop, surface, displace, fog, light, shadow, photon, cvex

  1. float fit(float value, float omin, float omax, float nmin, float nmax)

  2. vector fit(vector value, vector omin, vector omax, vector nmin, vector nmax)

  3. vector4 fit(vector4 value, vector4 omin, vector4 omax, vector4 nmin, vector4 nmax)

Takes the value in the range (omin, omax) and shifts it to the corresponding value in the new range (nmin, nmax). For example, fit(.3, 0, 1, 10, 20) would return 13.