Skip to content

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

@gsx123

Description

@gsx123

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions