Added Quaternion::Normalize static method
Former-commit-id: a4530be00673dec5b9731b75fb4edbac7ccd69d5
This commit is contained in:
parent
00a35cd565
commit
1b94977722
|
|
@ -76,6 +76,7 @@ template<typename T> class NzQuaternion
|
||||||
|
|
||||||
static NzQuaternion Identity();
|
static NzQuaternion Identity();
|
||||||
static NzQuaternion Lerp(const NzQuaternion& from, const NzQuaternion& to, T interpolation);
|
static NzQuaternion Lerp(const NzQuaternion& from, const NzQuaternion& to, T interpolation);
|
||||||
|
static NzQuaternion Normalize(const NzQuaternion& quat, T* length = nullptr);
|
||||||
static NzQuaternion RotationBetween(const NzVector3<T>& from, const NzVector3<T>& to);
|
static NzQuaternion RotationBetween(const NzVector3<T>& from, const NzVector3<T>& to);
|
||||||
static NzQuaternion Slerp(const NzQuaternion& from, const NzQuaternion& to, T interpolation);
|
static NzQuaternion Slerp(const NzQuaternion& from, const NzQuaternion& to, T interpolation);
|
||||||
static NzQuaternion Zero();
|
static NzQuaternion Zero();
|
||||||
|
|
|
||||||
|
|
@ -408,6 +408,12 @@ NzQuaternion<T> NzQuaternion<T>::Lerp(const NzQuaternion& from, const NzQuaterni
|
||||||
return interpolated;
|
return interpolated;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
NzQuaternion<T> NzQuaternion<T>::Normalize(const NzQuaternion& quat, T* length)
|
||||||
|
{
|
||||||
|
return quat.GetNormal(length);
|
||||||
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
NzQuaternion<T> NzQuaternion<T>::RotationBetween(const NzVector3<T>& from, const NzVector3<T>& to)
|
NzQuaternion<T> NzQuaternion<T>::RotationBetween(const NzVector3<T>& from, const NzVector3<T>& to)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue