(x, range, includeMax)
| 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`. |