max<T extends num> function

T max<T extends num>(
  1. T a,
  2. T b
)

Implementation

T max<T extends num>(T a, T b) {
  if (a.isNaN) return b;
  if (b.isNaN) return a;
  return math.max(a, b);
}