N
Nobody
How does one round a float? ie... 4.4 returns 4, while 4.5 returns 5.
I see the floor and ceiling functions, but that floor would take 4.4 and
return 4 and ceiling would return 5. I guess I could find the part after the
decimal, but there doesn't seem to be a way to do that either. Other then
subtracting the floor and multiplying by 10 and taking the floor of that and
checking if its 5 or higher, but that seems really lame. There has to be a
better way.
I see the floor and ceiling functions, but that floor would take 4.4 and
return 4 and ceiling would return 5. I guess I could find the part after the
decimal, but there doesn't seem to be a way to do that either. Other then
subtracting the floor and multiplying by 10 and taking the floor of that and
checking if its 5 or higher, but that seems really lame. There has to be a
better way.