Commit e6be812f authored by avallee@chromium.org's avatar avallee@chromium.org

Fix test failure for 32 bit official build.

Official 32 bit builds seem to generate x86 fpu instructions while normal
development settings and Chromium settings generate SSE instructions. GCC has a
loss of precision bug (gcc.gnu.org/PR323) that results in a different floating
point value in some cases. This bug can be worked around by storing the
intermediate value in a variable.

BUG=334475

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245343 0039d316-1c4b-4281-b951-d872f2087c98
parent b0d44749
......@@ -131,10 +131,11 @@ int Tween::IntValueBetween(double value, int start, int target) {
else
delta++;
#if defined(OS_WIN)
return start + static_cast<int>(value * _nextafter(delta, 0));
value *= _nextafter(delta, 0);
#else
return start + static_cast<int>(value * nextafter(delta, 0));
value *= nextafter(delta, 0);
#endif
return start + static_cast<int>(value);
}
//static
......
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