Skip to content

Commit a93fca0

Browse files
committed
style: apply official clang-format to Average.java
1 parent 149e07b commit a93fca0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ private Average() {
3030
* @throws IllegalArgumentException if {@code numbers} is {@code null} or empty
3131
*/
3232
public static double average(double[] numbers) {
33-
if (numbers==null || numbers.length==0) {
33+
if (numbers == null || numbers.length == 0) {
3434
throw new IllegalArgumentException("Numbers array cannot be empty or null");
3535
}
3636
double sum = 0;
@@ -51,7 +51,7 @@ public static double average(double[] numbers) {
5151
* @throws IllegalArgumentException if {@code numbers} is {@code null} or empty
5252
*/
5353
public static long average(int[] numbers) {
54-
if (numbers==null || numbers.length==0) {
54+
if (numbers == null || numbers.length == 0) {
5555
throw new IllegalArgumentException("Numbers array cannot be empty or null");
5656
}
5757
long sum = 0;
@@ -72,9 +72,9 @@ public static long average(int[] numbers) {
7272
* @return an {@link OptionalDouble} with the mean, or empty if input is null/empty
7373
*/
7474
public static OptionalDouble averageStream(double[] numbers) {
75-
if (numbers==null || numbers.length==0) {
75+
if (numbers == null || numbers.length == 0) {
7676
return OptionalDouble.empty();
7777
}
7878
return Arrays.stream(numbers).average();
7979
}
80-
}
80+
}

0 commit comments

Comments
 (0)