1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

angle calc

This commit is contained in:
Michael
2023-08-26 20:19:25 +02:00
committed by GitHub
parent bd0f9bb280
commit fe6d96f4a0
3 changed files with 14 additions and 1 deletions

View File

@@ -116,6 +116,11 @@ public:
return std::sqrt(lengthSquared());
}
double angle() const
{
return std::atan2(y, x) * 180.0 / M_PI;
}
template <typename Handler>
void serialize(Handler &h, const int version)
{