[Solution] warning C4305: ‘initializing’ : truncation from ‘double’ to ‘float’

Pocket

VC++ Compiler throws warning C4305: ‘initializing’ : truncation from ‘double’ to ‘float’ warning when we try to declare float variable as double. Remember float M_PI = 3.1428571428571428     // This is actually double variable will throw the warning: warning C4305: ‘initializing’ : truncation from ‘double’ to ‘float’ The right way to … Continue reading “[Solution] warning C4305: ‘initializing’ : truncation from ‘double’ to ‘float’”