refactor(Core/Misc): fabs() to std::fabs() (#9790)

- prefer std functions over C functions
This commit is contained in:
Kitzunu 2022-01-01 00:41:00 +01:00 committed by GitHub
parent ac99eb48e1
commit 913e65f97f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 43 additions and 43 deletions

View file

@ -154,7 +154,7 @@ void RandomMovementGenerator<Creature>::_setRandomLocation(Creature* creature)
for (; itrNext != finalPath.end(); ++itr, ++itrNext)
{
distDiff = sqrt(((*itr).x - (*itrNext).x) * ((*itr).x - (*itrNext).x) + ((*itr).y - (*itrNext).y) * ((*itr).y - (*itrNext).y));
zDiff = fabs((*itr).z - (*itrNext).z);
zDiff = std::fabs((*itr).z - (*itrNext).z);
// Xinef: tree climbing, cut as much as we can
if (zDiff > 2.0f ||