Use Math.min instead of a custom one...