Big update.

This commit is contained in:
UltraNix
2022-03-12 22:28:00 +01:00
parent 6006eeeb01
commit 12d41d1314
2064 changed files with 427245 additions and 268481 deletions

View File

@@ -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)