function for rounding floats to integer