I think there is a bug with the actuate lib used in Stencyl
The current code in Back.hx, line 86 is
The "s*=" is not right because s is also used in the same expression
This code is working:
The current code in Back.hx, line 86 is
Code: [Select]
public function calculate (k:Float):Float {
if ((k /= 0.5) < 1) return 0.5 * (k * k * (((s *= (1.525)) + 1) * k - s));
return 0.5 * ((k -= 2) * k * (((s *= (1.525)) + 1) * k + s) + 2);
}
public function ease (t:Float, b:Float, c:Float, d:Float):Float {
if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
}
The "s*=" is not right because s is also used in the same expression
This code is working:
Code: [Select]
public function calculate (k:Float):Float {
var m:Float = s * 1.525;
if ((k /= 0.5) < 1) return 0.5 * (k * k * ((m + 1) * k - m));
return 0.5 * ((k -= 2) * k * ((m + 1) * k + m) + 2);
}
public function ease (t:Float, b:Float, c:Float, d:Float):Float {
var m:Float = s * 1.525;
if ((t/=0.5*d) < 1) return 0.5 * c * (t*t*((m+1)*t - m)) + b;
return 0.5 * c * ((t-=2)*t*((m+1)*t + m) + 2) + b;
}