Skip to content
New issue

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

BUG: Fix debug assertion on ShakeCurve animation. #27

Merged
merged 1 commit into from
Oct 25, 2020

Conversation

ssanderson
Copy link

Flutter's Curve class requires that the transform function map 0 to ~0 and 1
to ~1. The previous ShakeCurve transform function sin(t * 3 * pi).abs(), which
doesn't satisfy this property because sin(3 * pi) is 0, not 1.

Changing the constant from 3 to 2.5 produces the required endpoint value for t
= 1.

Fixes #23 .

Flutter's Curve class requires that the `transform` function map 0 to ~0 and 1
to ~1. The previous ShakeCurve transform function sin(t * 3 * pi).abs(), which
doesn't satisfy this property because sin(3 * pi) is 0, not 1.

Changing the constant from 3 to 2.5 produces the required endpoint value for t
= 1.
@xPutnikx
Copy link
Owner

Thank you @ssanderson for the contribution!

@xPutnikx xPutnikx merged commit 281a3bf into xPutnikx:master Oct 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid curve endpoint at 1.0
2 participants