Prefer int cast to floor()

Using floor() would break things if we encounter negative float values.