MCPcopy Index your code
hub / github.com/ampproject/amphtml / mod

Function mod

src/core/math.js:63–65  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

61 * // => 4
62 */
63export function mod(a, b) {
64 return a > 0 && b > 0 ? a % b : ((a % b) + b) % b;
65}
66
67/**
68 * Restricts a number to be in the given min/max range. The minimum value must

Callers 15

test-math.jsFile · 0.90
findOverlappingIndexFunction · 0.90
component.jsFile · 0.90
ScrollerWithRefFunction · 0.90
updateCurrentIndexFunction · 0.90
renderSlidesFunction · 0.90
provider.jsFile · 0.90
BentoAutocompleteFunction · 0.90
SelectorWithRefFunction · 0.90
select_Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected