1
0

Fixed clang warnings about abs() in Noise.cpp.

MSVC provides a float overload of abs(), clang does not. Using the proper fabs().
This commit is contained in:
madmaxoft 2014-06-10 18:27:17 +02:00
parent 366ecf9dfd
commit c259dad7b8

View File

@ -1022,7 +1022,7 @@ void cRidgedMultiNoise::Generate2D(
NOISE_DATATYPE Amplitude = FirstOctave.m_Amplitude;
for (int i = 0; i < ArrayCount; i++)
{
a_Array[i] = abs(a_Workspace[i] * Amplitude);
a_Array[i] = fabs(a_Workspace[i] * Amplitude);
}
// Add each octave:
@ -1038,7 +1038,7 @@ void cRidgedMultiNoise::Generate2D(
NOISE_DATATYPE Amplitude = itr->m_Amplitude;
for (int i = 0; i < ArrayCount; i++)
{
a_Array[i] += abs(a_Workspace[i] * Amplitude);
a_Array[i] += fabs(a_Workspace[i] * Amplitude);
}
}