Casting float to int is interesting. Not only it causes the value to get truncated, but it also changes binary representation. When you want to cast float to int you have two options:
1) If you came from c/c++, there are several ways to do cast operations but the natural thing would be to use (int).
2) You [...]
We pay for user submitted tutorials and articles that we publish. Anyone can send in a contribution
Learn More