Skip to content

Commit 8618487

Browse files
scottgonzalezdmethvin
authored andcommitted
Easing: Only use the state to calculate the value. Fixes #11284 - Simplify easings to only rely on the state.
1 parent bf7a4df commit 8618487

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/effects.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -400,11 +400,11 @@ jQuery.extend({
400400
},
401401

402402
easing: {
403-
linear: function( p, n, firstNum, diff ) {
404-
return firstNum + diff * p;
403+
linear: function( p ) {
404+
return p;
405405
},
406-
swing: function( p, n, firstNum, diff ) {
407-
return ( ( -Math.cos( p*Math.PI ) / 2 ) + 0.5 ) * diff + firstNum;
406+
swing: function( p ) {
407+
return ( -Math.cos( p*Math.PI ) / 2 ) + 0.5;
408408
}
409409
},
410410

0 commit comments

Comments
 (0)