MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / wrap

Function wrap

src/common/overlay/threejs/Transform.js:4–10  ·  view source on GitHub ↗
(source, min, max)

Source from the content-addressed store, hash-verified

2 * This program are made available under the terms of the Apache License, Version 2.0
3 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
4function wrap(source, min, max) {
5 if (source === max || source === min) {
6 return source;
7 }
8 let len = max - min;
9 return ((source - min) % len + len) % len + min
10}
11
12function rad(angle) {
13 return angle * Math.PI / 180;

Callers 1

Transform.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected