1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-12 16:15:20 +02:00

Cleanup headers in irr/include/ (#15181)

This commit is contained in:
DS
2024-10-18 10:58:32 +02:00
committed by GitHub
parent f2ab887644
commit e5d321d286
51 changed files with 76 additions and 180 deletions

View File

@@ -4,8 +4,10 @@
#pragma once
#include "irrMath.h"
#include "irrString.h"
#include "irrTypes.h"
#include <cfloat>
#include <climits>
#include <cmath>
namespace irr
{
@@ -305,7 +307,7 @@ inline const char *fast_atof_move(const char *in, f32 &result)
if (numDecimals < IRR_ATOF_TABLE_SIZE) {
value += decimal * fast_atof_table[numDecimals];
} else {
value += decimal * (f32)pow(10.f, -(float)numDecimals);
value += decimal * std::pow(10.f, -(float)numDecimals);
}
in = afterDecimal;
}
@@ -316,7 +318,7 @@ inline const char *fast_atof_move(const char *in, f32 &result)
// strtol10() will deal with both + and - signs,
// but calculate as f32 to prevent overflow at FLT_MAX
// Using pow with float cast instead of powf as otherwise accuracy decreases.
value *= (f32)pow(10.f, (f32)strtol10(in, &in));
value *= std::pow(10.f, (f32)strtol10(in, &in));
}
result = negative ? -value : value;