9miao / CrossApp

Cross-Platform Mobile APP Development Engine
MIT License
838 stars 422 forks source link

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

Open gsx123 opened 8 years ago

gsx123 commented 8 years ago

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函数好像也能用。