Fixing scissoring

This commit is contained in:
Krzosa Karol
2024-07-26 21:47:23 +02:00
parent 7803bc87a6
commit 9d02d5ab78
8 changed files with 572 additions and 616 deletions

View File

@@ -80,6 +80,15 @@ Rect2 operator+=(Rect2 &r, float value) { r = r + value; return r; }
Rect2 operator*=(Rect2 &r, float value) { r = r * value; return r; }
Rect2 operator/=(Rect2 &r, float value) { r = r / value; return r; }
bool operator==(Rect2 a, Rect2 b) {
bool result = a.min.x == b.min.x && a.min.y == b.min.y && a.max.x == b.max.x && a.max.y == b.max.y;
return result;
}
bool operator!=(Rect2 a, Rect2 b) {
bool result = !(a == b);
return result;
}
Vec2 operator-(Vec2 a, Vec2 b) { return {a.x - b.x, a.y - b.y}; }
Vec2 operator+(Vec2 a, Vec2 b) { return {a.x + b.x, a.y + b.y}; }
Vec2 operator*(Vec2 a, Vec2 b) { return {a.x * b.x, a.y * b.y}; }