MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / wrapNum

Function wrapNum

libs/leaflet/leaflet-src.js:113–118  ·  view source on GitHub ↗
(x, range, includeMax)

Source from the content-addressed store, hash-verified

111 // `range[0]` and `range[1]`. The returned value will be always smaller than
112 // `range[1]` unless `includeMax` is set to `true`.
113 function wrapNum(x, range, includeMax) {
114 var max = range[1],
115 min = range[0],
116 d = max - min;
117 return x === max && includeMax ? x : ((x - min) % d + d) % d + min;
118 }
119
120 // @function falseFn(): Function
121 // Returns a function which always returns `false`.

Callers 1

leaflet-src.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected