Wednesday, June 17, 2009

Little Sugar: Writing an oscillator function

Say you need to transform values v1, v2 in such a way that they lie between lowerlimit L and upper limit U

then u can use an oscillator function

new value = U - (L + (U * (1 / (1 + value))))

this new value will be between L and U, if u omit L then new value
would be between 0 - U