needed to cast double to int for the map's length.

Signed-off-by: ThePooN <thepoon@cartooncraft.fr>