Moin moin
Ich glaube ich stehe heute Morgen echt aufm Schlauch.. Oder es liegt daran das es einfach noch zu früh dafür ist...
Ich habe ne JavaScript Funktion, die ich gerne nach Autoit übersetzen möchte..
Aber wie gesagt ich bin anscheinend heute morgen des mathischen Denkens noch nicht mächtig
erst mal in javascript
document.write(test(125, 1, 400, 200));
function test(t, b, c, d)
{
// t: current time
// b: begInnIng value
// c: change In value
// d: duration
if ((t/=d/2) < 1) return (c-1)/2*t*t*t*t + b;
return -(c-1)/2 * ((t-=2)*t*t*t - 2) + b;
}
Ergebnis bei mir in javascipt ist 336.876953125
das ganze in autoit...
[autoit]; t: current time
; b: begInnIng value
; c: change In value
; d: duration
Func _easeInOutQuart( $t, $b, $c, $d)
; ((t/=d/2) < 1) return (c-1)/2*t*t*t*t + b;
if ($t=($t/($d/2))) < 1 Then return (($c-1)/2*$t*$t*$t*$t + $b)
;-(c-1)/2 * ((t-=2)*t*t*t - 2) + b;
return -(($c-1)/2 * ((($t=$t-2)*$t*$t*$t) - 2)) + $b
EndFunc
hier kommt aber 48706054688.5 raus...
ich denke es liegt an der Umstellung vom -= und /=
Naja ich Danke schon einmal...
MFG chris