Commit 9b5fadb5 authored by marcin's avatar marcin Committed by Commit Bot

Shortening float constant to 8 digits to remove Prone warning

Change removes Prone warning:

[FloatingPointLiteralPrecision] Floating point literal loses precision
            float start = 0.36787944117f; // 1/e == exp(-1)
                          ^
(see http://errorprone.info/bugpattern/FloatingPointLiteralPrecision)
Did you mean 'float start = 0.36787945f;'?

Bug: 
Change-Id: Ide3f12ff1bbe9698efc7fba72cf5a4ddf812ff6d
Reviewed-on: https://chromium-review.googlesource.com/793512Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Commit-Queue: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520156}
parent ce8833dd
......@@ -118,7 +118,7 @@ public class StackScroller {
if (x < 1.0f) {
x -= (1.0f - (float) Math.exp(-x));
} else {
float start = 0.36787944117f; // 1/e == exp(-1)
float start = 0.36787944f; // 1/e == exp(-1)
x = 1.0f - (float) Math.exp(1.0f - x);
x = start + x * (1.0f - start);
}
......
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