clampTo(): do not convert the input to double when dealing with integers