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

Code Example 1

double v1 = 20120313.0;
    float v2 = (float) v1;

Learn ReactJs, React Native from akashmittal.com