Author Topic: Rounding a number?  (Read 612 times)

How would I round lets say 10.88 to 11?

if there isn't a round function, you could try something with the % operator

mFloatLength(10.88, 0);

mFloatLength(10.88, 0);

Garatanium wants to round up apparently.

mCeil(10.88);

Garatanium wants to round up apparently.

mCeil(10.88);
He did not specify. Normal rounding would make 10.88 to 11.

mCeil, I believe.  mFloor is for rounding down.

Edit: Oops, missed Deso's post.

mCeil, I believe.  mFloor is for rounding down.

Edit: Oops, missed Deso's post.
You also missed Kalphiter's post, which uses real rounding.

If he wanted an example of forcing to round up, he would've said something like 17.12 to 18.

You also missed Kalphiter's post, which uses real rounding.

If he wanted an example of forcing to round up, he would've said something like 17.12 to 18.

Someone is being punctual today.

Also, I thought he would want to round up considering his range of "10.88 to 11?".

i could probably write a way of rounding without those, although it would be rather inefficient :D

Someone is being punctual today.

Also, I thought he would want to round up considering his range of "10.88 to 11?".
Which could either mean forcing it up, or using real rounding, because both would work in that situation.

But we should shut up about this until he clarifies.

Which could either mean forcing it up, or using real rounding, because both would work in that situation.

But we should shut up about this until he clarifies.
Which it appears that he has gone to bed :cookieMonster:

I didn't go to bed, I just got frustrated at mozilla fire fox and my computer. I wanted to round up or down. Thanks for all the help =)