Core/Random: Changed random functions returning doubles to return floats
* They were all cast to float at use anyway * Improves roll_chance_f performance (rand32() is now called internally by uniform_real_distribution once instead of twice)
This commit is contained in:
1 parent
56dc3bddd5
commit
7d57ef7299
13 files changed
+26
-26
No files matched your search
@@ -1591,7 +1591,7 @@ static float GetArmorReduction(float armor, uint8 attackerLevel)
|
||||
discreteResistProbability[i] = std::max(0.5f - 2.5f * std::fabs(0.1f * i - averageResist), 0.0f);
|
||||
}
|
||||
|
||||
float roll = float(rand_norm());
|
||||
float roll = rand_norm();
|
||||
float probabilitySum = 0.0f;
|
||||
|
||||
uint32 resistance = 0;
|
||||
|
||||
Reference in new issue
Block a user