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

@@ -65,7 +65,7 @@ NzVector3<T> NzVector3<T>::CrossProduct(const NzVector3& vec) const
}
template<typename T>
double NzVector3<T>::Distance(const NzVector3& vec) const
T NzVector3<T>::Distance(const NzVector3& vec) const
{
return std::sqrt(SquaredDistance(vec));
}
@@ -112,15 +112,15 @@ void NzVector3<T>::MakeFloor(const NzVector3& vec)
}
template<typename T>
double NzVector3<T>::Length() const
T NzVector3<T>::Length() const
{
return std::sqrt(SquaredLength());
}
template<typename T>
double NzVector3<T>::Normalize()
T NzVector3<T>::Normalize()
{
double length = Length();
T length = Length();
if (length != 0.f)
{