Min
Arithmetic
Pure
Generic
Min
A
0
Result
B
0
Description
Pure function returning the smaller of two numbers.
When to use
Use Min to enforce an upper bound on a computed value — for example, capping a retry count or limiting a page size. Both integer and decimal inputs are accepted. When you need to constrain a value between both a lower and an upper bound, Clamp is more convenient than combining Min and Max by hand.
Pins
Input pins
| Pin | Type | Default | Notes |
|---|---|---|---|
| A | generic(integer, decimal) | 0 | The first number to compare. |
| B | generic(integer, decimal) | 0 | The second number to compare. |
Output pins
| Pin | Type | Notes |
|---|---|---|
| Result | generic(integer, decimal) | The smaller of a and b. |
Example
Cap a requested page size at a maximum of 50. Wire the requested page size (integer or
decimal) into the A input of Min with B set to 50, then pass the Result output into
the downstream HTTP request node. The result is at most 50, preventing oversized queries
regardless of what the caller supplies.