MCPcopy Create free account
hub / github.com/adobe/react-spectrum / roundDown

Function roundDown

packages/react-stately/src/color/useColorWheelState.ts:85–92  ·  view source on GitHub ↗
(v: number)

Source from the content-addressed store, hash-verified

83}
84
85function roundDown(v: number) {
86 let r = Math.floor(v);
87 if (r === v) {
88 return v - 1;
89 } else {
90 return r;
91 }
92}
93
94function degToRad(deg: number) {
95 return (deg * Math.PI) / 180;

Callers 1

decrementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected