From 1487a1cd2732f913dfd0b0e9a3f50fb0921cc541 Mon Sep 17 00:00:00 2001 From: Boxfriend Date: Thu, 4 Dec 2025 00:31:43 -0500 Subject: [PATCH] utility Coordinate.cs --- AdventOfCode2025/Utils/Coordinate.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 AdventOfCode2025/Utils/Coordinate.cs diff --git a/AdventOfCode2025/Utils/Coordinate.cs b/AdventOfCode2025/Utils/Coordinate.cs new file mode 100644 index 0000000..4b680a1 --- /dev/null +++ b/AdventOfCode2025/Utils/Coordinate.cs @@ -0,0 +1,16 @@ +using System.Numerics; + +namespace AdventOfCode2025.Utils; + +public record struct Coordinate(int X, int Y) : IAdditionOperators, ISubtractionOperators +{ + public static Coordinate operator +(Coordinate left, Coordinate right) + { + return new Coordinate(left.X + right.X, left.Y + right.Y); + } + + public static Coordinate operator -(Coordinate left, Coordinate right) + { + return new Coordinate(left.X - right.X, left.Y - right.Y); + } +} \ No newline at end of file