MCPcopy
hub / github.com/monkeytypegame/monkeytype / roundTo2

Function roundTo2

packages/util/src/numbers.ts:20–22  ·  view source on GitHub ↗
(num: number)

Source from the content-addressed store, hash-verified

18 * @returns The input number rounded to two decimal places.
19 */
20export function roundTo2(num: number): number {
21 return Math.round((num + Number.EPSILON) * 100) / 100;
22}
23
24/**
25 * Calculates the mean (average) of an array of numbers.

Callers 15

loopFunction · 0.90
DailyActivityChartFunction · 0.90
getNumberWithMagnitudeFunction · 0.90
secondsToStringFunction · 0.90
formatTopPercentageFunction · 0.90
logTimingFunction · 0.90
test-timer.tsFile · 0.90
_startOldFunction · 0.90
getTimerBoundaryLabelsFunction · 0.90
getTimerBoundariesFunction · 0.90
getLaggedTimerBoundariesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected