fixed int() casting bug that didn't evidence in 2.7

if you run the sample, it breaks because int() doesn't round in py3k evidently

added calls to int(math.floor(float()))
Merge pull request #1 from aking1012/master

fixed int() casting bug that didn't evidence in 2.7