Commit 4507ad14 authored by oshima@chromium.org's avatar oshima@chromium.org

Round the snapped position when checking snapped

so that it can handle negative errors (like 0.999)

BUG=None
R=danakj@chromium.org

Review URL: https://codereview.chromium.org/467813002

Cr-Commit-Position: refs/heads/master@{#289105}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289105 0039d316-1c4b-4281-b951-d872f2087c98
parent 0decbb4b
......@@ -81,7 +81,7 @@ namespace {
void CheckSnapped(float snapped_position) {
const float kEplison = 0.0001f;
float diff = std::abs(snapped_position - static_cast<int>(snapped_position));
float diff = std::abs(snapped_position - gfx::ToRoundedInt(snapped_position));
DCHECK_LT(diff, kEplison);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment