MOHAWK: MYST: Use degree conversion common math funcs
This commit is contained in:
parent
fb3dcb9ee0
commit
a01babbd38
1 changed files with 4 additions and 3 deletions
|
@ -31,6 +31,7 @@
|
||||||
#include "mohawk/myst_stacks/myst.h"
|
#include "mohawk/myst_stacks/myst.h"
|
||||||
|
|
||||||
#include "common/events.h"
|
#include "common/events.h"
|
||||||
|
#include "common/math.h"
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
#include "common/textconsole.h"
|
#include "common/textconsole.h"
|
||||||
|
|
||||||
|
@ -3251,9 +3252,9 @@ Common::Point Myst::towerRotationMapComputeCoords(uint16 angle) {
|
||||||
Common::Point end;
|
Common::Point end;
|
||||||
|
|
||||||
// Polar to rect coords
|
// Polar to rect coords
|
||||||
double radians = angle * M_PI / 180.0;
|
float radians = Common::deg2rad<uint16,float>(angle);
|
||||||
end.x = (int16)(_towerRotationCenter.x + cos(radians) * 310.0);
|
end.x = (int16)(_towerRotationCenter.x + cos(radians) * 310.0f);
|
||||||
end.y = (int16)(_towerRotationCenter.y + sin(radians) * 310.0);
|
end.y = (int16)(_towerRotationCenter.y + sin(radians) * 310.0f);
|
||||||
|
|
||||||
return end;
|
return end;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue