Add an amount to a value, limiting the maximum result to max.
amount
value
max
The value to add to.
The amount to add.
The maximum value to return.
Add an
amountto avalue, limiting the maximum result tomax.