lerp fix 2
This commit is contained in:
parent
b422d2d509
commit
0d39240fc2
|
@ -733,7 +733,7 @@ namespace LinearAlgebra3D
|
||||||
ScalarType projectedMagnitude = rotation.v[0].Dot( normalizedAxis );
|
ScalarType projectedMagnitude = rotation.v[0].Dot( normalizedAxis );
|
||||||
if( projectedMagnitude == 1 )
|
if( projectedMagnitude == 1 )
|
||||||
{ // infinite possible solutions -> roadtrip!
|
{ // 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
|
// interpolated.Dot( interpolated ) == 0 should be impossible at this point
|
||||||
projectedMagnitude = rotation.v[0].Dot( interpolated );
|
projectedMagnitude = rotation.v[0].Dot( interpolated );
|
||||||
|
@ -744,7 +744,7 @@ namespace LinearAlgebra3D
|
||||||
rotation.v[0] -= projectedMagnitude * normalizedAxis;
|
rotation.v[0] -= projectedMagnitude * normalizedAxis;
|
||||||
rotation.v[0].Normalize();
|
rotation.v[0].Normalize();
|
||||||
rotation.v[1] = normalizedAxis;
|
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>
|
template<typename ScalarType>
|
||||||
|
|
Loading…
Reference in New Issue