Skip to content

Commit 790e687

Browse files
author
elasticsearchmachine
committed
[CI] Auto commit changes from spotless
1 parent 9a0fe02 commit 790e687

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

libs/exponential-histogram/src/main/java/org/elasticsearch/exponentialhistogram/ExponentialHistogramQuantile.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,7 @@ ValueAndPreviousValue negateAndSwap() {
167167
}
168168

169169
ValueAndPreviousValue clampTo(double min, double max) {
170-
return new ValueAndPreviousValue(
171-
Math.clamp(valueAtPreviousRank, min, max),
172-
Math.clamp(valueAtRank, min, max)
173-
);
170+
return new ValueAndPreviousValue(Math.clamp(valueAtPreviousRank, min, max), Math.clamp(valueAtRank, min, max));
174171
}
175172
}
176173
}

libs/exponential-histogram/src/test/java/org/elasticsearch/exponentialhistogram/QuantileAccuracyTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public void testMinMaxClampedPercentileAccuracy() {
8585
// The 0.5 percentile linearly interpolates between the two buckets.
8686
// For the (1, 2] bucket, the point of least relative error will be used (1.33333)
8787
// For the (2, 4] bucket, the max of the histogram should be used instead (2.1)
88-
double expectedResult = (4.0/3 + 2.1) / 2;
88+
double expectedResult = (4.0 / 3 + 2.1) / 2;
8989
double p50 = ExponentialHistogramQuantile.getQuantile(histogram, 0.5);
9090
assertThat(p50, equalTo(expectedResult));
9191
}

0 commit comments

Comments
 (0)