Skip to content

Commit c53c00b

Browse files
committed
Format AbsoluteMin condition
1 parent ecf7664 commit c53c00b

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/main/java/com/thealgorithms/maths/AbsoluteMin.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ public static int getMinValue(int... numbers) {
1919
for (int number : numbers) {
2020
long absoluteNumber = Math.abs((long) number);
2121
long absoluteMinValue = Math.abs((long) minValue);
22-
if (absoluteNumber < absoluteMinValue
23-
|| (absoluteNumber == absoluteMinValue && number < minValue)) {
22+
if (absoluteNumber < absoluteMinValue || (absoluteNumber == absoluteMinValue && number < minValue)) {
2423
// For equal absolute values, consistently choose the numerically smaller value.
2524
minValue = number;
2625
}

0 commit comments

Comments
 (0)