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:
Fabian 2023-08-06 19:08:06 +02:00 committed by GitHub
parent 6b83f36b6f
commit e099c292b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1239,8 +1239,8 @@ public:
{
double worldextent = 0;
for (int i = 0; i < 3; ++i) {
worldextent = max(worldextent, abs(bbox.maxs()[i]));
worldextent = max(worldextent, abs(bbox.mins()[i]));
worldextent = std::max(worldextent, std::abs(bbox.maxs()[i]));
worldextent = std::max(worldextent, std::abs(bbox.mins()[i]));
}
worldextent += 1;