MCPcopy Index your code
hub / github.com/GregTech6/gregtech6 / averageBytes

Method averageBytes

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

Note: Does not work on huge amounts of Bytes.

(byte... aBytes)

Source from the content-addressed store, hash-verified

1164 public static class Code {
1165 /** Note: Does not work on huge amounts of Bytes. */
1166 public static byte averageBytes(byte... aBytes) {
1167 if (aBytes == null || aBytes.length <= 0) return 0;
1168 return (byte)(sum(aBytes) / aBytes.length);
1169 }
1170
1171 /** Note: Does not work on huge amounts of Bytes. */
1172 public static byte averageUnsignedBytes(byte... aBytes) {

Callers

nothing calls this directly

Calls 1

sumMethod · 0.95

Tested by

no test coverage detected