aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/star_control/fvector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/titanic/star_control/fvector.cpp')
-rw-r--r--engines/titanic/star_control/fvector.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/engines/titanic/star_control/fvector.cpp b/engines/titanic/star_control/fvector.cpp
index 142d9ea3c0..fee74e6eba 100644
--- a/engines/titanic/star_control/fvector.cpp
+++ b/engines/titanic/star_control/fvector.cpp
@@ -51,8 +51,8 @@ FVector FVector::crossProduct(const FVector &src) const {
bool FVector::normalize(float & hyp) {
hyp = sqrt(_x * _x + _y * _y + _z * _z);
if (hyp==0) {
- return false;
- }
+ return false;
+ }
_x *= 1.0 / hyp;
_y *= 1.0 / hyp;
@@ -62,11 +62,14 @@ bool FVector::normalize(float & hyp) {
FVector FVector::addAndNormalize(const FVector &v) const {
FVector tempV(_x + v._x, _y + v._y, _z + v._z);
- float unused_scale=0.0;
- if (!tempV.normalize(unused_scale)) { // Do the normalization, put the scale amount in unused_scale,
- // but if it is unsuccessful, crash
- assert(unused_scale);
- }
+
+ float unusedScale = 0.0;
+ if (!tempV.normalize(unusedScale)) {
+ // Do the normalization, put the scale amount in unusedScale,
+ // but if it is unsuccessful, crash
+ assert(unusedScale);
+ }
+
return tempV;
}