Em. I’m looking at the easing equation here:
var easing = function( t, b, c, d ) {
return c * ( t /= d ) * t * t * t + b;
}
So presumably one can write it like this:
var easing = function( t, b, c, d ) {
return c * ( t = (t/d) ) * t * t * t + b;
}
or like this ? mmm.. not sure about this one:
var easing = function( t, b, c, d ) {
return c * t = c * (t/d) * t * t * t + b;
}
How exactly is this equation being parsed by javascript, I mean, we get:
return number = number;
wtf? How is this being handled.
Assuming that expression are evaluated from left to right, the expression can be simplified by following steps:
1)
2)
3)
JsFiddle for the code: http://jsfiddle.net/caGWz/