cpp static cast double to int