aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorDavid Fioramonti2018-05-24 07:19:04 -0700
committerThierry Crozat2018-07-03 23:08:48 +0100
commita01babbd38174a13764dbddb09c1ebaeba185d7b (patch)
tree6908687048396a58ac4b569a9d0965ac7936caa7 /engines
parentfb3dcb9ee0ff3b74e8c0a60cdc2c52821d7c879e (diff)
downloadscummvm-rg350-a01babbd38174a13764dbddb09c1ebaeba185d7b.tar.gz
scummvm-rg350-a01babbd38174a13764dbddb09c1ebaeba185d7b.tar.bz2
scummvm-rg350-a01babbd38174a13764dbddb09c1ebaeba185d7b.zip
MOHAWK: MYST: Use degree conversion common math funcs
Diffstat (limited to 'engines')
-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;
}