Thread: % and timevar
View Single Post
  #5  
Old 02-20-2003, 05:16 PM
Falados Falados is offline
Cucumber NPC
Falados's Avatar
Join Date: Jan 2003
Posts: 141
Falados is on a distinguished road
Send a message via ICQ to Falados Send a message via AIM to Falados
Quote:
Originally posted by HoudiniMan
doesn't int() round to the nearest integer?
or does it always round down, just stripping off the decimels?
cause it you had 13 fish i wouldn't want it to round 1.8 up to 2 and give you any free fish
int() is a conversion statement that converts floating points to integers, It just truncates the floating points disregaurding whether or not its >=.5 or not. If you want to round you could do something like...

var=int(var+0.5);
__________________

subliminal message: 1+1=3
Reply With Quote