This commit is contained in:
Dander7BD 2014-01-21 12:00:54 +01:00
parent 94f1c20817
commit b422d2d509
2 changed files with 10 additions and 1 deletions

View File

@ -753,7 +753,7 @@ namespace LinearAlgebra3D
::LinearAlgebra::Vector4<ScalarType> interpolated = ::LinearAlgebra::Nlerp( rotation.v[1], normalizedAxis, t );
if( interpolated.Dot(interpolated) == 0 )
return rotation; // return no change
return SnapAxisYToAxis_Nlerp( rotation, interpolated );
return SnapAxisYToNormal_UsingNlerp( rotation, interpolated );
}
}

View File

@ -46,7 +46,16 @@ namespace Oyster { namespace Math //! Oyster's native math library
//! Returns false if there is no explicit solution.
bool SuperpositionMatrix( const Float4x4 &in, const Float4x4 &out, Float4x4 &targetMem );
/********************************************************************
* Linear Interpolation
* @return start * (1-t) + end * t
********************************************************************/
using ::LinearAlgebra::Lerp;
/********************************************************************
* Normalized Linear Interpolation
* @return nullvector if Lerp( start, end, t ) is nullvector.
********************************************************************/
using ::LinearAlgebra::Nlerp;
} }