### Answer: How do I round a number?

by Nimster (Sexton)
 on Jul 26, 2000 at 09:46 UTC Need Help??

Q&A > math > How do I round a number? - Answer contributed by Nimster

```Use integer;
\$thevalue*=1;
Seems the simplest, IMHO. It rounds everything down, btw - so it acts kinda like 'div' in PASCAL. That's where it's useful. For rounding to the nearest, use any of the above.

Replies are listed 'Best First'.
RE: Answer: How do I round a number?
by Anonymous Monk on Sep 11, 2000 at 04:11 UTC
I think you mean int?(been a while since I used pascal). Div was the divisor operation. The result being not a rounded down number, but the divisor of the operation. as in: 5 div 2 = 2 meaining 5/2 = 2 remainder 1 . Div returns the 2, Mod returns the 1. Admittedly this is irrelivant to the origonal question, but... :)

Create A New User
Chatterbox?
 [choroba]: I've moved away from nvidia

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (12)
As of 2017-05-26 14:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
Voting Booth?
My favorite model of computation is ...

Results (190 votes). Check out past polls.