From a01babbd38174a13764dbddb09c1ebaeba185d7b Mon Sep 17 00:00:00 2001 From: David Fioramonti Date: Thu, 24 May 2018 07:19:04 -0700 Subject: MOHAWK: MYST: Use degree conversion common math funcs --- engines/mohawk/myst_stacks/myst.cpp | 7 ++++--- 1 file 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(angle); + end.x = (int16)(_towerRotationCenter.x + cos(radians) * 310.0f); + end.y = (int16)(_towerRotationCenter.y + sin(radians) * 310.0f); return end; } -- cgit v1.2.3