We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm having some issues with cancelling a running transition with {duration:0, stackBehavior: DESTRUCTIVE}.
{duration:0, stackBehavior: DESTRUCTIVE}
After chasing it down, the problem is demonstrated by the following code:
var easeInOutQuad= function(t, b, _c, d) { var c = _c - b; if ((t /= d / 2) < 1) { return c / 2 * t * t + b; } else { return -c / 2 * ((--t) * (t - 2) - 1) + b; } } easeInOutQuad(0,1,1,0) // Produces NaN isNaN(t/d) == isNaN(0/0) == true
This has a number of knock-on problems which I now have to add guards for.
Is it worth adding divide-by-zero protection to the functions?
The text was updated successfully, but these errors were encountered:
8c656e8
Eeeeh, you're right. Sorry for the trouble.
I don't think the tween-functions library should have its functions changed. A duration of 0 is ambiguous for a simple easing function.
I've pushed a change in this lib instead, where a duration of 0 will jump you to the end, as expected.
Sorry, something went wrong.
No branches or pull requests
I'm having some issues with cancelling a running transition with
{duration:0, stackBehavior: DESTRUCTIVE}
.After chasing it down, the problem is demonstrated by the following code:
This has a number of knock-on problems which I now have to add guards for.
Is it worth adding divide-by-zero protection to the functions?
The text was updated successfully, but these errors were encountered: