math.max()

Type Function
Library math.*
Return value Number
Revision 2017.3060
Keywords max, maximum
See also math.min()

Overview

Returns the maximum value among its arguments.

Syntax

math.max( x, ... )
x (required)

Number. A number.

Examples

print(math.max(1.2, -7, 3))        --->3
print(math.max(0, -100000000))     --->0
print(math.max(0, 1/0, math.huge)) --->inf