ARTools: New helper methods to do min on variable-length sets of IComparables and to restart Stopwatches.
ARTools: New helper methods to do min on variable-length sets of IComparables and to restart Stopwatches.

file:a/ARTools.cs -> file:b/ARTools.cs
--- a/ARTools.cs
+++ b/ARTools.cs
@@ -124,6 +124,34 @@
 				return "0";
 			}
 		}
+
+		public static T Min<T>(params T[] values) where T : IComparable<T>
+		{
+			if (values.Length < 2)
+			{
+				throw new ArgumentException("Min must be called with at least two arguments.");
+			}
+
+			IComparable<T> minValue = values[0];
+
+			for (long i = 1; i < values.LongLength; i++)
+			{
+				IComparable<T> value = values[i];
+
+				if (value.CompareTo((T)minValue) < 0)
+				{
+					minValue = value;
+				}
+			}
+
+			return (T)minValue;
+		}
+
+		public static void Restart(this System.Diagnostics.Stopwatch stopwatch)
+		{
+			stopwatch.Reset();
+			stopwatch.Start();
+		}
 	}
 }
 

file:b/EventSniffer.cs (new)
--- /dev/null
+++ b/EventSniffer.cs
@@ -1,1 +1,6 @@
+// AntennaRange © 2014 toadicus
+//
+// This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a
+// copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/
 
+

--- a/Properties/AssemblyInfo.cs
+++ b/Properties/AssemblyInfo.cs
@@ -25,7 +25,7 @@
 // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
 // The form "{Major}.{Minor}.*" will automatically update the build and revision,
 // and "{Major}.{Minor}.{Build}.*" will update just the revision.
-[assembly: AssemblyVersion("0.6.2.*")]
+[assembly: AssemblyVersion("0.6.3.*")]
 // The following attributes are used to specify the signing key for the assembly,
 // if desired. See the Mono documentation for more information about signing.
 //[assembly: AssemblyDelaySign(false)]