-
Notifications
You must be signed in to change notification settings - Fork 166
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
有关float的相等判断 #6
Comments
是哪个布局需要加这个? |
|
奇怪,我是向下取整了,照理应该不会出现问题才对,顶多就是重新换行而已啊。 |
你的宽度向下取整了,但是高度没有,所以也会引起这个问题。 |
已修改好 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
有关float的相等判断,建议改用 exp (A - B) < 0.01或其它更准确的判断方式。因为精度问题,在判断上时常会导致布局错乱。
The text was updated successfully, but these errors were encountered: