diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 19:16:19 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 19:16:19 +0200 |
commit | 1e0a52b03fe655d7073ef20703dbb2e7646f74d3 (patch) | |
tree | f1709c2e9565d78c791653e71e6a4b26b3138423 /XY.h | |
parent | 277157b3e06b2deeacbdbc8bf6190de19f88169d (diff) |
add XY struct for 2d points and offsets
Diffstat (limited to 'XY.h')
-rw-r--r-- | XY.h | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -0,0 +1,13 @@ +#pragma once + +struct XY { + int x = 0; + int y = 0; + + XY operator + (const XY &) const; + XY operator - () const; + XY operator - (const XY &) const; + XY& operator += (const XY &); + XY& operator -= (const XY &); +}; + |