Added Quaternion spheric interpolation

Fixed NzVector(2/3)::Length() and NzQuaternion::Magnitude() returning
double instead of template type
Added quaternion dot product
Added gitignore
This commit is contained in:
Lynix
2012-06-13 17:54:07 +02:00
parent e2a38b3790
commit 0f84f8eda8
7 changed files with 254 additions and 49 deletions

View File

@@ -55,7 +55,7 @@ template<> inline int NzVector2<int>::AbsDotProduct(const NzVector2<int>& vec) c
}
template<typename T>
double NzVector2<T>::Distance(const NzVector2& vec) const
T NzVector2<T>::Distance(const NzVector2& vec) const
{
return std::sqrt(SquaredDistance(vec));
}
@@ -96,15 +96,15 @@ void NzVector2<T>::MakeFloor(const NzVector2& vec)
}
template<typename T>
double NzVector2<T>::Length() const
T NzVector2<T>::Length() const
{
return std::sqrt(SquaredLength());
}
template<typename T>
double NzVector2<T>::Normalize()
T NzVector2<T>::Normalize()
{
double length = Length();
T length = Length();
if (length != 0.f)
{