// Operators.
Vector<T, Size>& operator+= (const Vector<T, Size>& v);
Vector<T, Size>& operator-= (const Vector<T, Size>& v);
+ Vector<T, Size>& operator= (const Vector<T, Size>& v);
const T& operator[] (int ndx) const { DE_ASSERT(de::inBounds(ndx, 0, Size)); return m_data[ndx]; }
T& operator[] (int ndx) { DE_ASSERT(de::inBounds(ndx, 0, Size)); return m_data[ndx]; }
}
template <typename T, int Size>
+inline Vector<T, Size>& Vector<T, Size>::operator=(const Vector<T, Size>& v)
+{
+ for (int i = 0; i < Size; i++)
+ m_data[i] = v.m_data[i];
+ return *this;
+}
+
+template <typename T, int Size>
inline Vector<T, Size>::Vector (const T (&v)[Size])
{
for (int i = 0; i < Size; i++)
*this = value;
}
+ inline GenericVec4 (const GenericVec4& other)
+ {
+ v.iData[0] = other.v.iData[0];
+ v.iData[1] = other.v.iData[1];
+ v.iData[2] = other.v.iData[2];
+ v.iData[3] = other.v.iData[3];
+ }
+
GenericVec4& operator= (const GenericVec4& value)
{
v.iData[0] = value.v.iData[0];