Implement Vector4 operator=
This commit is contained in:
@@ -81,6 +81,8 @@ namespace LinearAlgebra {
|
|||||||
|
|
||||||
Vector4 operator+() const; // Unary + Operator
|
Vector4 operator+() const; // Unary + Operator
|
||||||
Vector4 operator-() const; // Unary - Operator (Negation)
|
Vector4 operator-() const; // Unary - Operator (Negation)
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
#if MUTABLE
|
#if MUTABLE
|
||||||
float x;
|
float x;
|
||||||
|
@@ -141,6 +141,15 @@ Vector4 Vector4::operator-(const Vector4& rhs) const
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vector4 &Vector4::operator=(const Vector4 &rhs) {
|
||||||
|
x = rhs.x;
|
||||||
|
y = rhs.y;
|
||||||
|
z = rhs.z;
|
||||||
|
w = rhs.w;
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#pragma endregion
|
#pragma endregion
|
Reference in New Issue
Block a user