MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / getSum

Method getSum

src/main/java/net/optifine/util/MathUtils.java:36–54  ·  view source on GitHub ↗
(int[] vals)

Source from the content-addressed store, hash-verified

34 }
35
36 public static int getSum(int[] vals)
37 {
38 if (vals.length <= 0)
39 {
40 return 0;
41 }
42 else
43 {
44 int i = 0;
45
46 for (int j = 0; j < vals.length; ++j)
47 {
48 int k = vals[j];
49 i += k;
50 }
51
52 return i;
53 }
54 }
55
56 public static int roundDownToPowerOfTwo(int val)
57 {

Callers 2

getRandomIndexMethod · 0.95
getAverageMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected