All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.levkoposc.MathTools Maven / Gradle / Ivy

There is a newer version: 0.3.1.2
Show newest version
package com.github.levkoposc;

public final class MathTools {

    public double average(int[] numbers){
        if (numbers.length == 0)
            return 0;

        double sum = 0;
        for (int number : numbers)
            sum += number;

        return sum / numbers.length;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy