Fixed minor implicit conversion issues, using floats instead of doubles

These issues were found in Clang static analyzer with -Wconversion. Only two, both very minor.