diff options
-rw-r--r-- | engines/titanic/star_control/dvector.h | 3 | ||||
-rw-r--r-- | engines/titanic/star_control/fvector.h | 2 | ||||
-rw-r--r-- | engines/titanic/star_control/viewport.cpp | 5 |
3 files changed, 4 insertions, 6 deletions
diff --git a/engines/titanic/star_control/dvector.h b/engines/titanic/star_control/dvector.h index 4b85c0342d..e9ca257498 100644 --- a/engines/titanic/star_control/dvector.h +++ b/engines/titanic/star_control/dvector.h @@ -27,9 +27,6 @@ namespace Titanic { -const double Rad2Deg = 180.0 / M_PI; -const double Deg2Rad = 1.0 / Rad2Deg; - class DAffine; /** diff --git a/engines/titanic/star_control/fvector.h b/engines/titanic/star_control/fvector.h index d4ba754138..5303702699 100644 --- a/engines/titanic/star_control/fvector.h +++ b/engines/titanic/star_control/fvector.h @@ -27,6 +27,8 @@ namespace Titanic { +const double Rad2Deg = 180.0 / M_PI; +const double Deg2Rad = 1.0 / Rad2Deg; enum Axis { X_AXIS, Y_AXIS, Z_AXIS }; class FPose; diff --git a/engines/titanic/star_control/viewport.cpp b/engines/titanic/star_control/viewport.cpp index d2bdce00e0..fb933f240a 100644 --- a/engines/titanic/star_control/viewport.cpp +++ b/engines/titanic/star_control/viewport.cpp @@ -246,7 +246,6 @@ void CViewport::fn19(double *v1, double *v2, double *v3, double *v4) { } void CViewport::reset() { - const double FACTOR = 2 * M_PI / 360.0; _rawPose.copyFrom(_orientation); _rawPose._vector = _position; @@ -254,8 +253,8 @@ void CViewport::reset() { _center = FPoint((double)_width * 0.5, (double)_height * 0.5); _centerVector._x = MIN(_center._x, _center._y); - _centerVector._y = tan(_field18 * FACTOR); - _centerVector._z = tan(_field1C * FACTOR); + _centerVector._y = tan(_field18 * Deg2Rad); + _centerVector._z = tan(_field1C * Deg2Rad); _flag = true; } |