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

Function nonNegativeMod

packages/@internationalized/date/src/manipulation.ts:258–264  ·  view source on GitHub ↗
(a: number, b: number)

Source from the content-addressed store, hash-verified

256}
257
258function nonNegativeMod(a: number, b: number) {
259 let result = a % b;
260 if (result < 0) {
261 result += b;
262 }
263 return result;
264}
265
266function addTimeFields(time: Mutable<AnyTime>, duration: TimeDuration): number {
267 time.hour += duration.hours || 0;

Callers 1

balanceTimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected