diff options
Diffstat (limited to 'engines/titanic/star_control/dvector.cpp')
-rw-r--r-- | engines/titanic/star_control/dvector.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/titanic/star_control/dvector.cpp b/engines/titanic/star_control/dvector.cpp index 8e071cf0ab..e4c5b15cb0 100644 --- a/engines/titanic/star_control/dvector.cpp +++ b/engines/titanic/star_control/dvector.cpp @@ -21,8 +21,17 @@ */ #include "titanic/star_control/dvector.h" +#include "common/algorithm.h" namespace Titanic { +void DVector::fn3() { + double hyp = sqrt(_x * _x + _y * _y + _z * _z); + assert(hyp); + + _x *= 1.0 / hyp; + _y *= 1.0 / hyp; + _z *= 1.0 / hyp; +} } // End of namespace Titanic |