Truncates a number to an integer