Replace floor with int casting