Using
Math.round(yourFloat);
better than
(int)yourFloat;
It's all about accuracy. If you use (int), you just get the numbers after the deleted point. If you use Math, you will get a rounded number. It doesn't seem like a big deal. For example, if you try to round something like 3.1, both methods will produce the same result - 3.
3,9 3,8. 4,
(int)3.9 = 3
Math.round(3.9) = 4