Check out example codes for "c float to int". It will help you in understanding the concepts better.

Code Example 1

# you can cast in c like so
float my_float= 1.446;
int my_int = (int) my_float;

Learn ReactJs, React Native from akashmittal.com