aboutsummaryrefslogtreecommitdiff
path: root/umath
diff options
context:
space:
mode:
authorjacopograndi <jacopo.grandi@outlook.it>2022-01-04 13:35:02 +0100
committerjacopograndi <jacopo.grandi@outlook.it>2022-01-04 13:35:02 +0100
commitbb16c32bde58cba70e4877aa2d3ebd04332eb575 (patch)
treede3d82cca043c26cbaa64837a3b2c18efc6ddb64 /umath
parent411d2f6d6a6e5370d33f0f54b2f2de7147a9d977 (diff)
linux compile and imgs
Diffstat (limited to 'umath')
-rw-r--r--umath/intersect.h10
-rw-r--r--umath/vec2.h64
2 files changed, 37 insertions, 37 deletions
diff --git a/umath/intersect.h b/umath/intersect.h
index 1cb1923..2705707 100644
--- a/umath/intersect.h
+++ b/umath/intersect.h
@@ -1,6 +1,6 @@
-#ifndef INTERSECT_H
-#define INTERSECT_H
-
-bool intersect_
-
+#ifndef INTERSECT_H
+#define INTERSECT_H
+
+bool intersect_
+
#endif \ No newline at end of file
diff --git a/umath/vec2.h b/umath/vec2.h
index ee72143..248dcc1 100644
--- a/umath/vec2.h
+++ b/umath/vec2.h
@@ -1,33 +1,33 @@
-#ifndef VEC2_H
-#define VEC2_H
-
-class vec2 {
- public:
- float x;
- float y;
-
- vec2() : x(0), y(0) {};
- vec2(float x, float y) : x(x), y(y) {};
-
- vec2(const vec2 &oth) { x = oth.x; y = oth.y; };
- vec2(vec2 &oth) { x = oth.x; y = oth.y; };
-
- vec2 operator+(const vec2 &rhs) {
- return vec2 { x + rhs.x, y + rhs.y };
- }
- vec2 operator-(const vec2 &rhs) {
- return vec2 { x - rhs.x, y - rhs.y };
- }
- vec2 operator*(const float m) {
- return vec2 { x * m, y * m };
- }
- vec2 operator/(const float m) {
- return vec2 { x / m, y / m };
- }
- vec2 operator+=(vec2 oth) { x += oth.x; y += oth.y; }
- vec2 operator-=(vec2 oth) { x -= oth.x; y -= oth.y; }
- vec2 operator*=(float m) { x *= m; y *= m; }
- vec2 operator/=(float m) { x /= m; y /= m; }
-};
-
+#ifndef VEC2_H
+#define VEC2_H
+
+class vec2 {
+ public:
+ float x;
+ float y;
+
+ vec2() : x(0), y(0) {};
+ vec2(float x, float y) : x(x), y(y) {};
+
+ vec2(const vec2 &oth) { x = oth.x; y = oth.y; };
+ vec2(vec2 &oth) { x = oth.x; y = oth.y; };
+
+ vec2 operator+(const vec2 &rhs) {
+ return vec2 { x + rhs.x, y + rhs.y };
+ }
+ vec2 operator-(const vec2 &rhs) {
+ return vec2 { x - rhs.x, y - rhs.y };
+ }
+ vec2 operator*(const float m) {
+ return vec2 { x * m, y * m };
+ }
+ vec2 operator/(const float m) {
+ return vec2 { x / m, y / m };
+ }
+ vec2 operator+=(vec2 oth) { x += oth.x; y += oth.y; }
+ vec2 operator-=(vec2 oth) { x -= oth.x; y -= oth.y; }
+ vec2 operator*=(float m) { x *= m; y *= m; }
+ vec2 operator/=(float m) { x /= m; y /= m; }
+};
+
#endif \ No newline at end of file