Fix warnings for MSVC14

warning C4456: declaration of '...' hides previous local declaration
warning C4244: 'initializing': conversion from 'double' to 'const float', possible loss of data