mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 16:43:47 +00:00
Big update.
This commit is contained in:
@@ -34,20 +34,20 @@
|
||||
auto dx = destX - startX;
|
||||
auto dy = destY - startY;
|
||||
|
||||
auto ang = atan2(dy, dx);
|
||||
auto ang = std::atan2(dy, dx);
|
||||
ang = (ang >= 0) ? ang : 2 * float(M_PI) + ang;
|
||||
return ang;
|
||||
}
|
||||
|
||||
[[nodiscard]] inline float getSlopeAngle(float startX, float startY, float startZ, float destX, float destY, float destZ)
|
||||
{
|
||||
float floorDist = sqrt(pow(startY - destY, 2.0f) + pow(startX - destX, 2.0f));
|
||||
return atan(abs(destZ - startZ) / abs(floorDist));
|
||||
float floorDist = std::sqrt(pow(startY - destY, 2.0f) + pow(startX - destX, 2.0f));
|
||||
return atan(std::abs(destZ - startZ) / std::abs(floorDist));
|
||||
}
|
||||
|
||||
[[nodiscard]] inline float getSlopeAngleAbs(float startX, float startY, float startZ, float destX, float destY, float destZ)
|
||||
{
|
||||
return abs(getSlopeAngle(startX, startY, startZ, destX, destY, destZ));
|
||||
return std::abs(getSlopeAngle(startX, startY, startZ, destX, destY, destZ));
|
||||
}
|
||||
|
||||
[[nodiscard]] inline double getCircleAreaByRadius(double radius)
|
||||
|
||||
Reference in New Issue
Block a user