-
Notifications
You must be signed in to change notification settings - Fork 101
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
图形width和height存在精度问题 #218
Comments
另外,精度问题是可接受的,浮点数误差不可避免。在误差范围内相等就可以了。 |
因为attrs.width和attrs.height的数据源的精度问题,遇到了在使用geo_box.ts文件里的isBoxIntersect和isBoxContain方法的时候,计算结果不正确的情况 |
屏幕录制2025-01-10 09.45.21.zip |
我试了下,发现 resize 会进行矩阵运算,导致图形的 x 和 y 出现了浮点数误差,宽高也跟着计算得到一个浮点数了。 这个我针对性处理一下,修正一下图形的 x 和 y。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
在对齐像素网格设置下,图形的width和height有时候会存在精度问题,会导致基于attrs.width和attrs.height的计算不准确
The text was updated successfully, but these errors were encountered: