From 9b453277059fd015703873172d0dc87b4a29cb55 Mon Sep 17 00:00:00 2001 From: Aki Date: Fri, 3 Feb 2023 22:00:28 +0100 Subject: Created engine module right now containing only Point This might be a bit too generic of a name, but the intent is to get the main shared abstracts for gameplay loop and/or simulation outside of the game executable implementation to redirect dependencies. --- engine/include/kurator/engine/Point.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 engine/include/kurator/engine/Point.h (limited to 'engine/include') diff --git a/engine/include/kurator/engine/Point.h b/engine/include/kurator/engine/Point.h new file mode 100644 index 0000000..0e9f0ab --- /dev/null +++ b/engine/include/kurator/engine/Point.h @@ -0,0 +1,26 @@ +#pragma once + + +namespace kurator +{ +namespace engine +{ + + +struct Point +{ + double x; + double y; + double magnitude() const; + double distance(const Point& other) const; + double angle() const; + Point rotate(double angle) const; + Point scale(double _scale) const; + Point normalized() const; + Point operator-(const Point& other) const; + Point operator+(const Point& other) const; +}; + + +} // namespace engine +} // namespace kurator -- cgit v1.1