maxOrNull

fun ByteBuffer.maxOrNull(): Byte?
fun ShortBuffer.maxOrNull(): Short?
fun IntBuffer.maxOrNull(): Int?
fun LongBuffer.maxOrNull(): Long?
fun CharBuffer.maxOrNull(): Char?

Returns the largest element or null if there are no elements.

fun FloatBuffer.maxOrNull(): Float?
fun DoubleBuffer.maxOrNull(): Double?

Returns the largest element or null if there are no elements. If any of elements is NaN returns NaN.