Math.max() and Math.min() that are equivalent to Math.clamp().
Example:
int min = 5, max = 10;
/*before*/ input = Math.max(Math.min(max, input), min);
/*after*/ input = Math.clamp(input, min, max);
By default, the inspection only shows when it can statically prove that min is lesser or equal than max.
This is done to avoid any IllegalArgumentException due to semantics changes.
If you want the inspection to show up nonetheless, you can enable the Warn even if the lower bound could be higher than the upper
bound option.
New in 2026.1