Great, glad it is working for you đ

]]>Thanks Dino!

]]>There are a few downsides in comparison to my solution, although of course which solution you might wish to use depends on your application.

In no particular order:

1) x^k is complex floating point function (when k is not an integer), and depending on application can be slower than my solution which uses basic arithmetic. For fine control, k will need to be a real number.

2) I present a single function who’s constant controlling it provides a complete range of curves in both directions (i.e. curving up or curving down), without the need for different formulae or special cases.

3) x^k does not create a symmetrical curve. Using x^k means that the differential (that would be the slope) of the curve is always zero at zero, no matter the value of k. As you can see in my plots, k also changes the slope at zero and thus allows for slight curves. In my solution, the angle of the slope at x = 0 and x = 1 has symmetry. Depending on your application this can be a desirable characteristic> I find it to be so for pretty much all tuning applications

4) x^k requires very large powers to generate sharp curves, which has the potenital for floating point inacuracy. My formula on the other hand provides such sharp curves with small values in a reasonable range. It makes it very suitable for implementation in fixed point for instance, as well as being more robust.

As far as I know, there are no disadvantages to my formula compared with x^k.

Thank you for you interest, and I hope you find this useful.

]]>y = x ^ n (starts at 0, ends at 1)

y = 1 – (x ^ n) (starts at 1, ends at 0)

where x ranges from 0 to 1.

for n > 1, the function accelerates, for n between 0 and 1 the function decelerates.

This also gives normalized ranges.

See also:

http://www.wolframalpha.com/input/?i=y+%3D+x++5,+y+%3D+x+3,+y+%3D+x++100

and

http://www.wolframalpha.com/input/?i=y+%3D+1+-+(x++0.2),+y+%3D+1+-+(x+3),+y+%3D+x++100

]]>