lerp fix 2

This commit is contained in:
Dander7BD 2014-01-21 12:08:31 +01:00
parent b422d2d509
commit 0d39240fc2
1 changed files with 2 additions and 2 deletions

View File

@ -733,7 +733,7 @@ namespace LinearAlgebra3D
ScalarType projectedMagnitude = rotation.v[0].Dot( normalizedAxis );
if( projectedMagnitude == 1 )
{ // infinite possible solutions -> roadtrip!
::LinearAlgebra::Vector4<ScalarType> interpolated = ::LinearAlgebra::Nlerp( rotation.v[1], normalizedAxis, t );
::LinearAlgebra::Vector4<ScalarType> interpolated = ::LinearAlgebra::Nlerp( rotation.v[1], normalizedAxis, (ScalarType)0.5f );
// interpolated.Dot( interpolated ) == 0 should be impossible at this point
projectedMagnitude = rotation.v[0].Dot( interpolated );
@ -744,7 +744,7 @@ namespace LinearAlgebra3D
rotation.v[0] -= projectedMagnitude * normalizedAxis;
rotation.v[0].Normalize();
rotation.v[1] = normalizedAxis;
rotation.v[2] = rotation.v[0].Cross( rotation.v[1] );
rotation.v[2].xyz = rotation.v[0].xyz.Cross( rotation.v[1].xyz );
}
template<typename ScalarType>