Float -> int static casting for smoother scrolling