MCPcopy
hub / github.com/angular/angular / calculateMean

Method calculateMean

packages/benchpress/src/statistic.ts:14–18  ·  view source on GitHub ↗
(samples: number[])

Source from the content-addressed store, hash-verified

12 }
13
14 static calculateMean(samples: number[]) {
15 let total = 0;
16 samples.forEach((x) => (total += x));
17 return total / samples.length;
18 }
19
20 static calculateStandardDeviation(samples: number[], mean: number) {
21 let deviation = 0;

Callers 3

statistic_spec.tsFile · 0.80
formatStatsFunction · 0.80
validateMethod · 0.80

Calls 1

forEachMethod · 0.45

Tested by

no test coverage detected