human error fix

This commit is contained in:
Dander7BD 2014-02-14 15:24:19 +01:00
parent c85cecd05a
commit 911700676c
1 changed files with 1 additions and 1 deletions

View File

@ -377,7 +377,7 @@ namespace LinearAlgebra3D
inline ::LinearAlgebra::Vector3<ScalarType> AngularAxis( const ::LinearAlgebra::Quaternion<ScalarType> &rotation ) inline ::LinearAlgebra::Vector3<ScalarType> AngularAxis( const ::LinearAlgebra::Quaternion<ScalarType> &rotation )
{ {
ScalarType angle = ScalarType(2) * (ScalarType)::std::acos( rotation.real ), ScalarType angle = ScalarType(2) * (ScalarType)::std::acos( rotation.real ),
multiplier = angle / (ScalarType)::std::sqrt( rotation.real ); multiplier = angle / (ScalarType)::std::sqrt( ScalarType(1) - rotation.real * rotation.real );
return multiplier * rotation.imaginary; return multiplier * rotation.imaginary;
} }