Blockland Forums > Modification Help

Rounding a number?

Pages: (1/3) > >>

Gartanium:

How would I round lets say 10.88 to 11?

phflack:

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

Kalphiter:

mFloatLength(10.88, 0);

Desolation:


--- Quote from: Kalphiter on January 29, 2011, 01:08:26 AM ---mFloatLength(10.88, 0);

--- End quote ---

Garatanium wants to round up apparently.

mCeil(10.88);

Chrono:


--- Quote from: Desolation on January 29, 2011, 01:33:39 AM ---Garatanium wants to round up apparently.

mCeil(10.88);

--- End quote ---
He did not specify. Normal rounding would make 10.88 to 11.

Pages: (1/3) > >>

Go to full version