summaryrefslogtreecommitdiffhomepage
path: root/digital/ai/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'digital/ai/src/common')
-rw-r--r--digital/ai/src/common/playground.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/digital/ai/src/common/playground.h b/digital/ai/src/common/playground.h
index 4f225a50..b3682fbb 100644
--- a/digital/ai/src/common/playground.h
+++ b/digital/ai/src/common/playground.h
@@ -48,8 +48,11 @@
/** Distance to playground borders for general movements, mm. */
#define PG_BORDER_DISTANCE 250
+/** Return mirror X coordinate, using a horizontal symmetry. */
+#define PG_MIRROR_X(x) (PG_WIDTH - (x))
+
/** Return X coordinate, applying symmetry according to team color. */
-#define PG_X(x) (team_color ? (x) : PG_WIDTH - (x))
+#define PG_X(x) (team_color ? (x) : PG_MIRROR_X (x))
/** Same as PG_Y, but for Y coordinate. Actually nothing is done, there is no
* symmetry. */