Rounding: Difference between revisions

From Macros Wiki
Jump to navigationJump to search
ConnerO (talk | contribs)
No edit summary
ConnerO (talk | contribs)
No edit summary
Line 1: Line 1:
To round use a funstion such as:
To round use a function such as:
[[Image:round.png|right|round]]
[[Image:round.png|right|round]]
if a1 < 0 then b1=int(a1-0.5)<br>
if a1 < 0 then b1=int(a1-0.5)<br>
if a1 > 0 then b1=int(a1+0.5)
if a1 > 0 then b1=int(a1+0.5)

Revision as of 15:06, 27 July 2010

To round use a function such as:

round
round

if a1 < 0 then b1=int(a1-0.5)
if a1 > 0 then b1=int(a1+0.5)