Merge pull request #174 from Aviloi/master

Added != operator to Vector2/3/4 and Matrix
This commit is contained in:
Rob Loach
2022-03-28 20:34:10 -04:00
committed by GitHub
4 changed files with 16 additions and 0 deletions

View File

@@ -71,6 +71,10 @@ class Matrix : public ::Matrix {
&& m15 == other.m15;
}
bool operator!=(const ::Matrix& other) {
return !(*this == other);
}
#ifndef RAYLIB_CPP_NO_MATH
/**
* Returns the trace of the matrix (sum of the values along the diagonal)

View File

@@ -36,6 +36,10 @@ class Vector2 : public ::Vector2 {
&& y == other.y;
}
bool operator!=(const ::Vector2& other) {
return !(*this == other);
}
#ifndef RAYLIB_CPP_NO_MATH
Vector2 Add(const ::Vector2& vector2) const {
return Vector2Add(*this, vector2);

View File

@@ -43,6 +43,10 @@ class Vector3 : public ::Vector3 {
&& z == other.z;
}
bool operator!=(const ::Vector3& other) {
return !(*this == other);
}
#ifndef RAYLIB_CPP_NO_MATH
Vector3 Add(const ::Vector3& vector3) {
return Vector3Add(*this, vector3);

View File

@@ -48,6 +48,10 @@ class Vector4 : public ::Vector4 {
&& w == other.w;
}
bool operator!=(const ::Vector4& other) {
return !(*this == other);
}
inline ::Rectangle ToRectangle() {
return {x, y, z, w};
}