MCPcopy Create free account
hub / github.com/GregTech6/gregtech6 / averageShorts

Method averageShorts

src/main/java/gregapi/util/UT.java:1180–1183  ·  view source on GitHub ↗

Note: Does not work on huge amounts of Bytes.

(short... aShorts)

Source from the content-addressed store, hash-verified

1178
1179 /** Note: Does not work on huge amounts of Bytes. */
1180 public static short averageShorts(short... aShorts) {
1181 if (aShorts == null || aShorts.length <= 0) return 0;
1182 return (short)(sum(aShorts) / aShorts.length);
1183 }
1184
1185 /** Note: Does not work on huge amounts of Shorts. */
1186 public static short averageUnsignedShorts(short... aShorts) {

Callers

nothing calls this directly

Calls 1

sumMethod · 0.95

Tested by

no test coverage detected