AnyDice

maximum of DIE

This function yields the highest number on the DIE. In case of the empty die this is 0.

Examples

output [maximum of d6]
output [maximum of 3d6]

Do it yourself

function: maximum of DIE:d {
 result: 1@[reverse {DIE}]
}