diff options
author | Aki <please@ignore.pl> | 2023-02-03 22:00:28 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2023-02-03 22:00:28 +0100 |
commit | 9b453277059fd015703873172d0dc87b4a29cb55 (patch) | |
tree | 3df0415c5b8160f9d97dae12f0c7adb55c4a23db /engine/include | |
parent | b5a71a9c776386805a12a722be23bf8d7b7e25fe (diff) | |
download | kurator-9b453277059fd015703873172d0dc87b4a29cb55.zip kurator-9b453277059fd015703873172d0dc87b4a29cb55.tar.gz kurator-9b453277059fd015703873172d0dc87b4a29cb55.tar.bz2 |
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.
Diffstat (limited to 'engine/include')
-rw-r--r-- | engine/include/kurator/engine/Point.h | 26 |
1 files changed, 26 insertions, 0 deletions
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 |