Implement Vector4 operator=
This commit is contained in:
@@ -81,6 +81,8 @@ namespace LinearAlgebra {
|
||||
|
||||
Vector4 operator+() const; // Unary + Operator
|
||||
Vector4 operator-() const; // Unary - Operator (Negation)
|
||||
|
||||
|
||||
public:
|
||||
#if MUTABLE
|
||||
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
|
Reference in New Issue
Block a user