From d5e85b4258da5d6ab94d33b1a74a7ea482e2c421 Mon Sep 17 00:00:00 2001 From: Dander7BD Date: Tue, 11 Feb 2014 09:32:49 +0100 Subject: [PATCH] minor refractoring --- .../DanBiasGame/GameClientState/Camera_Basic.cpp | 6 +++--- Code/OysterMath/LinearMath.h | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Code/Game/DanBiasGame/GameClientState/Camera_Basic.cpp b/Code/Game/DanBiasGame/GameClientState/Camera_Basic.cpp index 4878f3c4..750cf2de 100644 --- a/Code/Game/DanBiasGame/GameClientState/Camera_Basic.cpp +++ b/Code/Game/DanBiasGame/GameClientState/Camera_Basic.cpp @@ -88,9 +88,9 @@ const Quaternion & Camera_Basic::GetRotation() const if( this->rotationIsOutOfDate ) { // Maintain rotation resolution by keeping axis within [0, 2pi] (trigonometric methods gets faster too) - Float4 numerator; - ::std::modf( this->angularAxis * (0.5f / pi), numerator.xyz ); - this->angularAxis -= ((2.0f * pi) * numerator).xyz; + Float4 integer; + ::std::modf( this->angularAxis * (0.5f / pi), integer.xyz ); + this->angularAxis -= ((2.0f * pi) * integer).xyz; this->rotation = Rotation( this->angularAxis ); this->rotationIsOutOfDate = false; diff --git a/Code/OysterMath/LinearMath.h b/Code/OysterMath/LinearMath.h index 2f01dbca..a6d48eb2 100644 --- a/Code/OysterMath/LinearMath.h +++ b/Code/OysterMath/LinearMath.h @@ -125,17 +125,17 @@ namespace std } /******************************************************************* - * @param numerator of the vector vec - * @return the denomiator of the vector vec. + * @param integer part of the elements in vector vec + * @return the fract part of the elements in vector vec. *******************************************************************/ template - inline ::LinearAlgebra::Vector3 modf( const ::LinearAlgebra::Vector3 &vec, ::LinearAlgebra::Vector3 &numerator ) + inline ::LinearAlgebra::Vector3 modf( const ::LinearAlgebra::Vector3 &vec, ::LinearAlgebra::Vector3 &integer ) { - ::LinearAlgebra::Vector3 denominator; - denominator.x = (ScalarType)modf( vec.x, &numerator.x ); - denominator.y = (ScalarType)modf( vec.y, &numerator.y ); - denominator.z = (ScalarType)modf( vec.z, &numerator.z ); - return denominator; + ::LinearAlgebra::Vector3 fract; + fract.x = (ScalarType)modf( vec.x, &integer.x ); + fract.y = (ScalarType)modf( vec.y, &integer.y ); + fract.z = (ScalarType)modf( vec.z, &integer.z ); + return fract; } /*******************************************************************