max

infix fun <T : Comparable<T>> T.max(other: T): T

Returns the maximum of two comparable values.

Return

The maximum of the two values.

Receiver

The first value to compare.

Parameters

T

The type of the values, which must implement the Comparable interface.

other

The second value to compare.