Rounding numbers? (Release Announcements)

by mva1985 ⌂ @, Friday, January 03, 2014, 03:53 (1175 days ago) @ Aaron

if you know you will always be dealing with a positive number the easiest and fastest way is this:

int(x+.5)

example if x is 1.2 then it will return 1 BUT if x is 1.55 it will return a 2


Complete thread:

 RSS Feed of thread

powered by my little forum