Skip to content

Commit

Permalink
fix(utils): Aggregator should ignore NaN
Browse files Browse the repository at this point in the history
Signed-off-by: Karl Schrab <[email protected]>
  • Loading branch information
kschrab committed Dec 15, 2023
1 parent 87c05e9 commit 9e616d4
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ public Aggregator() {
}

public Aggregator add(double value) {
if (Double.isNaN(value)) {
return this;
}

min = Math.min(min, value);
max = Math.max(max, value);
sum += value;
Expand Down

0 comments on commit 9e616d4

Please sign in to comment.