Use std::abs instead of abs() from C standard library (#369)
abs() from C standard library operates on integers, which is almost certainly not what was intended.
This commit is contained in:
parent
6b83f36b6f
commit
e099c292b0
|
|
@ -1239,8 +1239,8 @@ public:
|
||||||
{
|
{
|
||||||
double worldextent = 0;
|
double worldextent = 0;
|
||||||
for (int i = 0; i < 3; ++i) {
|
for (int i = 0; i < 3; ++i) {
|
||||||
worldextent = max(worldextent, abs(bbox.maxs()[i]));
|
worldextent = std::max(worldextent, std::abs(bbox.maxs()[i]));
|
||||||
worldextent = max(worldextent, abs(bbox.mins()[i]));
|
worldextent = std::max(worldextent, std::abs(bbox.mins()[i]));
|
||||||
}
|
}
|
||||||
worldextent += 1;
|
worldextent += 1;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue