aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk
diff options
context:
space:
mode:
Diffstat (limited to 'engines/mohawk')
-rw-r--r--engines/mohawk/myst_stacks/myst.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/mohawk/myst_stacks/myst.cpp b/engines/mohawk/myst_stacks/myst.cpp
index 0cb0f05a36..647676e304 100644
--- a/engines/mohawk/myst_stacks/myst.cpp
+++ b/engines/mohawk/myst_stacks/myst.cpp
@@ -31,6 +31,7 @@
#include "mohawk/myst_stacks/myst.h"
#include "common/events.h"
+#include "common/math.h"
#include "common/system.h"
#include "common/textconsole.h"
@@ -3251,9 +3252,9 @@ Common::Point Myst::towerRotationMapComputeCoords(uint16 angle) {
Common::Point end;
// Polar to rect coords
- double radians = angle * M_PI / 180.0;
- end.x = (int16)(_towerRotationCenter.x + cos(radians) * 310.0);
- end.y = (int16)(_towerRotationCenter.y + sin(radians) * 310.0);
+ float radians = Common::deg2rad<uint16,float>(angle);
+ end.x = (int16)(_towerRotationCenter.x + cos(radians) * 310.0f);
+ end.y = (int16)(_towerRotationCenter.y + sin(radians) * 310.0f);
return end;
}