From 4a894868983902f7093787d3cb9276891c75c7eb Mon Sep 17 00:00:00 2001 From: Boxfriend Date: Fri, 5 Dec 2025 12:32:58 -0500 Subject: [PATCH] utility method and property --- AdventOfCode2025/Utils/Range.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/AdventOfCode2025/Utils/Range.cs b/AdventOfCode2025/Utils/Range.cs index f0860d5..8272a04 100644 --- a/AdventOfCode2025/Utils/Range.cs +++ b/AdventOfCode2025/Utils/Range.cs @@ -1,3 +1,8 @@ namespace AdventOfCode2025.Utils; -public record struct Range(ulong Min, ulong Max); \ No newline at end of file +public record struct Range(ulong Min, ulong Max) +{ + public ulong InclusiveCount => Max - Min + 1; + + public bool IsInRange(ulong value) => value >= Min && value <= Max; +} \ No newline at end of file