diff --git a/Utils/Extensions.cs b/Utils/LinqExtensions.cs similarity index 94% rename from Utils/Extensions.cs rename to Utils/LinqExtensions.cs index 7a99c1c..f417bf2 100644 --- a/Utils/Extensions.cs +++ b/Utils/LinqExtensions.cs @@ -1,17 +1,7 @@ namespace AdventOfCode.Utils; -public static class Extensions +public static class LinqExtensions { - public static int Signal(this int x) - { - return x switch - { - < 0 => -1, - > 0 => 1, - _ => 0 - }; - } - /// /// Returns a slice of the given list /// diff --git a/Utils/MathExtensions.cs b/Utils/MathExtensions.cs new file mode 100644 index 0000000..7785629 --- /dev/null +++ b/Utils/MathExtensions.cs @@ -0,0 +1,14 @@ +namespace AdventOfCode.Utils; + +public static class MathExtensions +{ + public static int Signal(this int x) + { + return x switch + { + < 0 => -1, + > 0 => 1, + _ => 0 + }; + } +} \ No newline at end of file