joseph> I have a floating number which I need to "round-down" to the
joseph> nearest whole number. I am doing this by type-casting it as an
joseph> "int". Would this work all the time ?
It should.
There is also the floor() function in the math module:
>>> math.floor(4.71)
4.0
>>> int(4.71)
4
>>> 4.71 - int(4.71)
0.70999999999999996
>>> 4.71 - math.floor(4.71)
0.70999999999999996
Skip