Min

From Pico-8 Wiki
Jump to navigation Jump to search
min( first, [second] )
Returns the minimum of two numbers.
first
The first number.

second
The second number. (default 0)

Examples

print(min(40, 20))    -- 20

print(min(2.7, -3.5)) -- -3.5

print(min(8, 8))      -- 8

print(min(5))         -- 0

print(min(-5))        -- -5

See also