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

CAGeometry.cpp 的 fround 函数有问题,请修正。 #112

Open
gsx123 opened this issue Dec 13, 2015 · 0 comments
Open

CAGeometry.cpp 的 fround 函数有问题,请修正。 #112

gsx123 opened this issue Dec 13, 2015 · 0 comments

Comments

@gsx123
Copy link

gsx123 commented Dec 13, 2015

CAGeometry.cpp 的 fround函数有问题

float fround(float x)//double round
{
float y = 10000;
int xx = x > FLT_EPSILON ? (x * y + 0.5) : (x * y - 0.5);
return xx/y;
}

当入参是一个较大的正数时(214812.00),计算结果变为负数了。直接影响到 CATableView 条目数过多的情况下,只会显示第一屏,无法向下滚动。

不知道这个函数这么处理有什么意图呢,我改为标准的round函数好像也能用。

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