MCPcopy
hub / github.com/omgovich/colord / round

Function round

src/helpers.ts:9–11  ·  view source on GitHub ↗
(number: number, digits = 0, base = Math.pow(10, digits))

Source from the content-addressed store, hash-verified

7};
8
9export const round = (number: number, digits = 0, base = Math.pow(10, digits)): number => {
10 return Math.round(base * number) / base + 0;
11};
12
13export const floor = (number: number, digits = 0, base = Math.pow(10, digits)): number => {
14 return Math.floor(base * number) / base + 0;

Callers 15

brightnessMethod · 0.90
alphaMethod · 0.90
hueMethod · 0.90
roundXyzaFunction · 0.90
roundLchaFunction · 0.90
rgbaToLchaFunction · 0.90
roundCmykaFunction · 0.90
cmykaToRgbaFunction · 0.90
rgbaToCmykaFunction · 0.90
roundHslaFunction · 0.90
roundHsvaFunction · 0.90
roundHwbaFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…