aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-10-31 20:20:00 +0100
committerShauren <shauren.trinity@gmail.com>2023-10-31 20:20:00 +0100
commit9894f6b802c974bb36acd7fbb0d083455a1f0f1b (patch)
tree458f167a846d70d4b2391c805423d9342b36f89a /src/server/game/Spells/SpellInfo.cpp
parenta0fdac0ecc119b4ba85d41f86891b3cd35f7acde (diff)
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)
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 7be8c52f8d5..656bd37e3a7 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -123,7 +123,7 @@ float SpellImplicitTargetInfo::CalcDirectionAngle() const
case TARGET_DIR_FRONT_LEFT:
return static_cast<float>(M_PI/4);
case TARGET_DIR_RANDOM:
- return float(rand_norm())*static_cast<float>(2*M_PI);
+ return rand_norm() * static_cast<float>(2 * M_PI);
default:
return 0.0f;
}