From 1e0a52b03fe655d7073ef20703dbb2e7646f74d3 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 23 Oct 2024 19:16:19 +0200 Subject: add XY struct for 2d points and offsets --- XY.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 XY.h (limited to 'XY.h') diff --git a/XY.h b/XY.h new file mode 100644 index 0000000..2aac824 --- /dev/null +++ b/XY.h @@ -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 &); +}; + -- cgit v1.2.3