commit | 4d1d0e9d92e708b532fa7338804f42938efdfcbf | [log] [tgz] |
---|---|---|
author | Aurimas Liutikas <aurimas@google.com> | Thu Jun 02 14:25:28 2016 -0700 |
committer | Aurimas Liutikas <aurimas@google.com> | Thu Jun 02 14:25:28 2016 -0700 |
tree | f6290c19dcc5a57807cfbb0c144e5ddc2b98368f | |
parent | 45b0ea2a10e79b580aabb411126d8d6b79c9da95 [diff] |
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