I'm trying to compute values from 0 to 1 but not according to a mathematical equation, but rather I want to define my own points, similar to the Curves in Photoshop. And the result would be computed from that curve.
So, for example I compute f(0.5) and it returns 0.28 and so on.
Is there a way to do this in Javascript? Thank you.