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

Code Example 1

int index = 5;
float indexFloat = float(index);

Learn ReactJs, React Native from akashmittal.com