View Single Post
  #2  
Old 12-20-2011, 03:47 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You can use the round function to round a floating point number to the nearest integer value:
Code:
value = 5.3

if round(value) == 5.0:
	print 'Is equal to 5'
If you want the integer component without rounding, then you can use the int function.
Reply With Quote