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

Code Example 1

Convert.ToInt32(float)

Code Example 2

float someFloat = 42.7f;
int someInt = (int)someFloat;               // 42

Learn ReactJs, React Native from akashmittal.com