GFX: Use degree conversion common math funcs

This commit is contained in:
David Fioramonti 2018-05-24 17:48:55 -07:00 committed by Thierry Crozat
parent 8e1f712327
commit e00881804f
2 changed files with 5 additions and 3 deletions

View file

@ -22,12 +22,13 @@
#include "graphics/transform_tools.h"
#include "common/math.h"
#include <math.h>
namespace Graphics {
FloatPoint TransformTools::transformPoint(FloatPoint point, const float rotate, const Common::Point &zoom, const bool mirrorX, const bool mirrorY) {
float rotateRad = rotate * M_PI / 180.0f;
float rotateRad = Common::deg2rad<float>(rotate);
float x = point.x;
float y = point.y;
x = (x * zoom.x) / kDefaultZoomX;