MCPcopy Create free account
hub / github.com/DeepNotesApp/DeepNotes / roundToMultiple

Function roundToMultiple

apps/client/src/code/utils/math.ts:1–6  ·  view source on GitHub ↗
(
  value: number,
  params: { base: number; roundFunc?: (value: number) => number },
)

Source from the content-addressed store, hash-verified

1export function roundToMultiple(
2 value: number,
3 params: { base: number; roundFunc?: (value: number) => number },
4) {
5 return (params.roundFunc ?? Math.round)(value / params.base) * params.base;
6}

Callers 1

roundTimeToMinutesFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected