Skip to content

Conversation

@johannesodland
Copy link
Contributor

Double precision errors can prevent playState from becoming "finished",
which in turn prevents the finished promise from resolving.

This is caused by precision loss due to floating point computations. For instance, converting an internal holdTime of 100000 to CSSNumberish and back can cause currentTime to become 99999.99999999999.

When the imprecise currentTime is compared against the effectEnd() with a regular >= operator the comparison will fail. This PR introduces an epsilon check to address this and ensure that the playState can become "finished".

Copy link

@porfirioribeiro porfirioribeiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be the reason why sometimes my timelines never finish!

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.

2 participants