Explicitly cast int64_t to float

This fixes warnings when bulding with MSVC.
Merge pull request #1554 from mstorsjo/add-float-cast

Explicitly cast int64_t to float