Math.floor() call replaced with (int) cast