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

abs函数问题 #4

Open
wanghao-98 opened this issue Jul 31, 2024 · 0 comments
Open

abs函数问题 #4

wanghao-98 opened this issue Jul 31, 2024 · 0 comments

Comments

@wanghao-98
Copy link

在cube.cpp,LerpVertex函数中,abs函数的参数为int类型,结果会进行舍入,需要修改为std空间下,如下:
if (std::abs(isoLevel - v1) < Eps) return p1;
if (std::abs(isoLevel - v2) < Eps) return p2;
if (std::abs(v1 - v2) < Eps) return p1;
修改后结果正确。

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