1
\$\begingroup\$

I have this function that acts as an ease-in:

protected static function easeIn(ratio:Number):Number {
  return ratio * ratio * ratio;
}    

Ratio is a value between 0 and 1.

The function works okay, but I'd like to make it a bit less "jumpy." I mean, it accelerates too fast and abruptly slows down.

However I'm not sure what values should I play around to achieve what I want, does anyone know?

\$\endgroup\$
  • \$\begingroup\$ Can you say a bit more on how the function is used? Is ratio linearly changed from 0 to 1 or back and this function determines the actual transparency level or whatever? If so, what are the "values" you can play around with? And I'd be surprised that the acceleration is faster in the beginning than at the end. If it's supposed to be an iterative function then it can't work like that. Maybe play around a bit here wolframalpha.com/input/?i=y%3Dx%5E3%2C+where+0%3C%3Dx%3C%3D1 or have a look at this? easings.net \$\endgroup\$ – Christian Oct 4 '15 at 12:41
  • \$\begingroup\$ Every frame that function is called, and then the new ratio is multiplied by the value I choose as an end-value. That particular easing function acts as an exponential growth in acceleration. \$\endgroup\$ – Artemix Oct 5 '15 at 14:19
  • 1
    \$\begingroup\$ And how does the ratio change? \$\endgroup\$ – Christian Oct 5 '15 at 20:49
  • \$\begingroup\$ The ratio changes linearly, always. It measures the time. \$\endgroup\$ – Artemix Oct 5 '15 at 22:46
  • \$\begingroup\$ Ok. That's what I guessed but you never confirmed that. Now could you maybe say a few words in response to the rest of my comment? Have you looked at those two links? What other functions have you tried? What exactly is it you want? It's a bit like you're asking "how do I change this function to something I like" which of course is an impossible question to answer so give us a bit more to go on here, please. \$\endgroup\$ – Christian Oct 11 '15 at 12:00