Explicit conversion from double to int

Should shut up a warning from MSVC