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

Snap with sleep enabled #28

Open
Khalinda opened this issue Aug 20, 2019 · 0 comments
Open

Snap with sleep enabled #28

Khalinda opened this issue Aug 20, 2019 · 0 comments

Comments

@Khalinda
Copy link

Khalinda commented Aug 20, 2019

In getResponsiveValue:

` // when sleep is enabled, the emphasis is stopping on a responsiveValue quickly, and it's less about easing into position.

// If sleep is enabled, add a small amount to snap so it'll tend to snap into a more accurate position before sleeping starts.

if(sleepEnable) {
snap *= 0.5 + 0.5;
}
`
I don't think it means what you think it means.

"+" has higher precedence than "*=". Furthermore "*=" is right associative. Isn't

snap *= 0.5 + 0.5;

equivalent to :

snap *= 1.0;

Did you perhaps mean:

snap = 0.5*snap + 0.5;
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

No branches or pull requests

1 participant