Skip to content

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