Rounding: Difference between revisions

From Macros Wiki
Jump to navigationJump to search
ConnerO (talk | contribs)
New page: To round use a funstion such as: right|round if a1 < 0 then b1=int(a1-0.5) if a1 > 0 then b1=int(a1+0.5)
 
ConnerO (talk | contribs)
No edit summary
 
(2 intermediate revisions by the same user not shown)
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)
: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)

Latest 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)