def specialRound ( number , rounding ) : temp = 0 if rounding == 0 : temp = number else : temp = round ( number , rounding ) if temp % 1 == 0 : return int ( temp ) else : return float ( temp )
python 3, round number
A method used to round a number in the way that UsefulUtils rounds .
def specialRound(number, rounding):
    """A method used to round a number in the way that UsefulUtils rounds."""
    temp = 0
    if rounding == 0:
        temp = number
    else:
        temp =  round(number, rounding)
    if temp % 1 == 0:
        return int(temp)
    else:
        return float(temp)