aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/math
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/math')
-rw-r--r--src/libjin/math/je_quad.h7
-rw-r--r--src/libjin/math/je_vector2.hpp5
2 files changed, 8 insertions, 4 deletions
diff --git a/src/libjin/math/je_quad.h b/src/libjin/math/je_quad.h
index fd5e7a1..b07b5f6 100644
--- a/src/libjin/math/je_quad.h
+++ b/src/libjin/math/je_quad.h
@@ -15,17 +15,16 @@ namespace JinEngine
: x(0), y(0), w(0), h(0)
{
}
+
Quad(float _x, float _y, float _w, float _h)
: x(_x), y(_y), w(_w), h(_h)
{
}
- ///
- ///
- ///
+
float x, y, w, h;
};
} // namespace Math
} // namespace JinEngine
-#endif // __JE_QUAD_H__
+#endif // __JE_QUAD_H__ \ No newline at end of file
diff --git a/src/libjin/math/je_vector2.hpp b/src/libjin/math/je_vector2.hpp
index 0a1a1e8..406b756 100644
--- a/src/libjin/math/je_vector2.hpp
+++ b/src/libjin/math/je_vector2.hpp
@@ -42,6 +42,11 @@ namespace JinEngine
data[1] += v.data[1];
}
+ Vector2<T> operator +(const Vector2<T>& v)
+ {
+ return Vector2<T>(data[0] + v.data[0], data[1] + v.data[1]);
+ }
+
void set(T _x, T _y)
{
data[0] = _x;