Fix page snapping for large number pages.

Previous implementation suffered from float precision loss
causing incorrect results. Updated the int cast to only cast the
(pageOffset + truncator) which will always be a small number [0.4, 1.6)
thus will either be 0 or 1 after the cast. This way we avoid converting
currentPage to a float.

Bug: 29041279
Change-Id: I98f400ca8ad6ca7508fcd0de7866348ebdaf36ff
1 file changed