mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-12-06 09:30:00 +00:00
Merge pull request #174 from Aviloi/master
Added != operator to Vector2/3/4 and Matrix
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user