mirror of
https://github.com/azerothcore/azerothcore-wotlk.git
synced 2025-12-05 18:20:24 -08:00
Fix typo in tangent() function that could cause wrong trajectory calculations
The condition `if (x <= 100000.0f)` should be `if (x <= -100000.0f)` to properly handle negative extreme values from tan(). This bug could cause incorrect spell trajectory calculations which may lead to visual glitches or unexpected behavior on the client side. Co-authored-by: FrancescoBorzi <75517+FrancescoBorzi@users.noreply.github.com>
This commit is contained in:
parent
85cc94571b
commit
d474bc87b4
1 changed files with 1 additions and 1 deletions
|
|
@ -1869,7 +1869,7 @@ float tangent(float x)
|
|||
//if (x <= -std::numeric_limits<float>::max()) return -std::numeric_limits<float>::max();
|
||||
if (x < 100000.0f && x > -100000.0f) return x;
|
||||
if (x >= 100000.0f) return 100000.0f;
|
||||
if (x <= 100000.0f) return -100000.0f;
|
||||
if (x <= -100000.0f) return -100000.0f;
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue