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