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

How to calculate the distance the mouse will move? #5

Open
xxapp opened this issue Mar 19, 2017 · 0 comments
Open

How to calculate the distance the mouse will move? #5

xxapp opened this issue Mar 19, 2017 · 0 comments

Comments

@xxapp
Copy link

xxapp commented Mar 19, 2017

Sorry to bother you, because this is not an issue exactly.

I'm learning from the source code, but I can't understand this sentence:

let x = position.x + 100 * Math.pow(1 + velocity.x, 2) * sign(velocity.x);

I think 100 * (1+velocity.x)^2 mey be a formula to calculate the displacement, but I can't describe where the 100 and 1 come from.

Could you please help me?

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