mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-22 07:32:21 +07:00
18 lines
372 B
Java
18 lines
372 B
Java
// IDEA-191876
|
|
class Test {
|
|
public static boolean is(double[] values) {
|
|
double absSum = 0;
|
|
double min = Double.NaN;
|
|
double max = Double.NaN;
|
|
|
|
for (double d : values) {
|
|
if (!(d <= max))
|
|
max = d;
|
|
if (!(d >= min))
|
|
min = d;
|
|
absSum += Math.abs(d);
|
|
}
|
|
|
|
return absSum == 0; // should not be highlighted as always 0
|
|
}
|
|
} |