lerp fix
This commit is contained in:
parent
94f1c20817
commit
b422d2d509
|
@ -753,7 +753,7 @@ namespace LinearAlgebra3D
|
||||||
::LinearAlgebra::Vector4<ScalarType> interpolated = ::LinearAlgebra::Nlerp( rotation.v[1], normalizedAxis, t );
|
::LinearAlgebra::Vector4<ScalarType> interpolated = ::LinearAlgebra::Nlerp( rotation.v[1], normalizedAxis, t );
|
||||||
if( interpolated.Dot(interpolated) == 0 )
|
if( interpolated.Dot(interpolated) == 0 )
|
||||||
return rotation; // return no change
|
return rotation; // return no change
|
||||||
return SnapAxisYToAxis_Nlerp( rotation, interpolated );
|
return SnapAxisYToNormal_UsingNlerp( rotation, interpolated );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,16 @@ namespace Oyster { namespace Math //! Oyster's native math library
|
||||||
//! Returns false if there is no explicit solution.
|
//! Returns false if there is no explicit solution.
|
||||||
bool SuperpositionMatrix( const Float4x4 &in, const Float4x4 &out, Float4x4 &targetMem );
|
bool SuperpositionMatrix( const Float4x4 &in, const Float4x4 &out, Float4x4 &targetMem );
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
* Linear Interpolation
|
||||||
|
* @return start * (1-t) + end * t
|
||||||
|
********************************************************************/
|
||||||
using ::LinearAlgebra::Lerp;
|
using ::LinearAlgebra::Lerp;
|
||||||
|
|
||||||
|
/********************************************************************
|
||||||
|
* Normalized Linear Interpolation
|
||||||
|
* @return nullvector if Lerp( start, end, t ) is nullvector.
|
||||||
|
********************************************************************/
|
||||||
using ::LinearAlgebra::Nlerp;
|
using ::LinearAlgebra::Nlerp;
|
||||||
} }
|
} }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue