Implement Vector4 operator=

This commit is contained in:
2024-02-01 20:47:44 -05:00
parent 12bf687f33
commit 792f7801bb
2 changed files with 11 additions and 0 deletions

View File

@@ -81,6 +81,8 @@ namespace LinearAlgebra {
Vector4 operator+() const; // Unary + Operator
Vector4 operator-() const; // Unary - Operator (Negation)
public:
#if MUTABLE
float x;

View File

@@ -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