Min

Returns the smallest value from one or more numbers.

Category: Math Returns: matches the input type; see overloads.

Signature

Min(value, ...)

Pass one or more values. The runtime picks the overload based on the argument types. Mixing types (e.g. int with decimal) routes through the number overload.

Overloads

ArgsReturnsNotes
(int, ...)intAll-integer; result is integer.
(decimal, ...)decimalAll-decimal; result is decimal.
(number, ...)numberFallback when types can’t be statically resolved (e.g. variable inputs).

Examples

Min(a, b)                       // two-value minimum
Min(hp, maxHp, 5)               // capped at 5, or lower if hp or maxHp is smaller
Min(trustA, trustB, trustC)     // pick the weakest relationship

Notes

Use Min(a, b) for a simple two-argument minimum. For more arguments, pass them all in a single call: Min(a, b, c, d). A single argument is also valid and returns that value unchanged; calling Min with no arguments at all is an error. The companion function Max returns the largest value.

Docs last synced: 2026-07-08
Screenshot viewer