using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace bbiwarg.Utility { public static class HelperFunctions { public static T thresholdRange(T min, T max, T value) { if (Comparer.Default.Compare(min, value) > 0) return min; if (Comparer.Default.Compare(value, max) > 0) return max; return value; } } }