Added OpenGL-like Vector constructors
Former-commit-id: 302389b6a915d66a0a0fb4cc9a748ed5266ae98c
This commit is contained in:
@@ -36,6 +36,18 @@ NzVector2<T>::NzVector2(const NzVector2<U>& vec)
|
||||
Set(vec);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
NzVector2<T>::NzVector2(const NzVector3<T>& vec)
|
||||
{
|
||||
Set(vec);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
NzVector2<T>::NzVector2(const NzVector4<T>& vec)
|
||||
{
|
||||
Set(vec);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T NzVector2<T>::AbsDotProduct(const NzVector2& vec) const
|
||||
{
|
||||
@@ -208,6 +220,24 @@ NzVector2<T>& NzVector2<T>::Set(const NzVector2<U>& vec)
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
NzVector2<T>& NzVector2<T>::Set(const NzVector3<T>& vec)
|
||||
{
|
||||
x = vec.x;
|
||||
y = vec.y;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
NzVector2<T>& NzVector2<T>::Set(const NzVector4<T>& vec)
|
||||
{
|
||||
x = vec.x;
|
||||
y = vec.y;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T NzVector2<T>::SquaredDistance(const NzVector2& vec) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user