Core/Random: Changed random functions returning doubles to return floats

Port From (https://github.com/TrinityCore/TrinityCore/commit/9894f6b802c974bb36acd7fbb0d083455a1f0f1b)
This commit is contained in:
hondacrx
2024-02-02 14:39:02 -05:00
parent c5538d6d40
commit a5bc0d0d9b
10 changed files with 24 additions and 24 deletions
+3 -3
View File
@@ -217,16 +217,16 @@ namespace Game
}
else if (u < 90)
{
m_intensity = (float)RandomHelper.NextDouble() * 0.3333f;
m_intensity = RandomHelper.NextSingle() * 0.3333f;
}
else
{
// Severe change, but how severe?
rn = RandomHelper.URand(0, 99);
if (rn < 50)
m_intensity = (float)RandomHelper.NextDouble() * 0.3333f + 0.3334f;
m_intensity = RandomHelper.NextSingle() * 0.3333f + 0.3334f;
else
m_intensity = (float)RandomHelper.NextDouble() * 0.3333f + 0.6667f;
m_intensity = RandomHelper.NextSingle() * 0.3333f + 0.6667f;
}
// return true only in case weather changes