mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2025-09-30 23:02:48 +02:00
12 lines
335 B
C#
12 lines
335 B
C#
namespace Phantom.Utils.Collections;
|
|
|
|
public static class Comparables {
|
|
public static T Min<T>(T first, T second) where T : IComparable<T> {
|
|
return first.CompareTo(second) < 0 ? first : second;
|
|
}
|
|
|
|
public static T Max<T>(T first, T second) where T : IComparable<T> {
|
|
return first.CompareTo(second) < 0 ? second : first;
|
|
}
|
|
}
|