A trivial, but useful, sum of a list of integers
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5378 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
9a8356892a
commit
ad51f30244
|
|
@ -99,6 +99,12 @@ public class MathUtils {
|
|||
return s;
|
||||
}
|
||||
|
||||
public static int sum(List<Integer> values) {
|
||||
int s = 0;
|
||||
for ( int v : values) s += v;
|
||||
return s;
|
||||
}
|
||||
|
||||
public static double sumLog10(double[] log10values) {
|
||||
return Math.pow(10.0, log10sumLog10(log10values));
|
||||
// double s = 0.0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue