diff --git a/Code/OysterMath/LinearMath.h b/Code/OysterMath/LinearMath.h index e7e99c91..5926a635 100644 --- a/Code/OysterMath/LinearMath.h +++ b/Code/OysterMath/LinearMath.h @@ -753,7 +753,7 @@ namespace LinearAlgebra3D ::LinearAlgebra::Vector4 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 ); } } diff --git a/Code/OysterMath/OysterMath.h b/Code/OysterMath/OysterMath.h index 9ce38deb..3770bf02 100644 --- a/Code/OysterMath/OysterMath.h +++ b/Code/OysterMath/OysterMath.h @@ -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; } }