commit | 06fa4ab57079949a0e4521abb8779d02be0ed630 | [log] [tgz] |
---|---|---|
author | Aurimas Liutikas <aurimas@google.com> | Thu Jun 02 14:19:35 2016 -0700 |
committer | Aurimas Liutikas <aurimas@google.com> | Thu Jun 02 14:19:35 2016 -0700 |
tree | 4a14875d7a6d173e6ffe2ec716d3f3088403d823 | |
parent | 3ecb7dffc87c474dd8f124e7b5d34ccaaa88c182 [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: I89eb0c99295a21b018859a23c75896d4c44b47ee