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
| Args | Returns | Notes |
|---|---|---|
(int, ...) | int | All-integer; result is integer. |
(decimal, ...) | decimal | All-decimal; result is decimal. |
(number, ...) | number | Fallback 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.