Use floor function, so that -0.5 is rounded to -1 instead of 0