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

Math.floor 和 ~~ 作用一样吗? #32

Open
fwon opened this issue Mar 1, 2017 · 0 comments
Open

Math.floor 和 ~~ 作用一样吗? #32

fwon opened this issue Mar 1, 2017 · 0 comments

Comments

@fwon
Copy link
Owner

fwon commented Mar 1, 2017

不一样,~~只适用于32位数字,更重要的是它对负数的处理与Math.floor(..)不同。

Math.floor(-49.6); //-50
~~-49.6;           //-49
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