Created MathUtils.capValueMinMax