MCPcopy Create free account
hub / github.com/AmazingAng/PolyWorld / getLevel

Function getLevel

src/lib/impact.ts:21–26  ·  view source on GitHub ↗
(score: number)

Source from the content-addressed store, hash-verified

19};
20
21function getLevel(score: number): ImpactLevel {
22 for (const l of IMPACT_LEVELS) {
23 if (score >= l.min) return l.level;
24 }
25 return "info";
26}
27
28/** Compute percentile ranks for an array of numbers (0-1) */
29function percentileRanks(values: number[]): number[] {

Callers 1

computeImpactScoresFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected