MCPcopy
hub / github.com/shzlw/zeu / getNextPos

Method getNextPos

src/utility.js:104–113  ·  view source on GitHub ↗
(curr, dest, speed)

Source from the content-addressed store, hash-verified

102 }
103
104 static getNextPos(curr, dest, speed) {
105 if (speed > 0 && curr + speed >= dest) {
106 return dest;
107 }
108
109 if (speed < 0 && curr + speed <= dest) {
110 return dest;
111 }
112 return curr + speed;
113 }
114
115 static shuffleArray(a) {
116 let j = 0;

Callers 8

drawObjectMethod · 0.80
drawLeftArrowMethod · 0.80
drawRightArrowMethod · 0.80
drawFrameMethod · 0.80
drawObjectMethod · 0.80
drawObjectMethod · 0.80
drawObjectMethod · 0.80
drawObjectMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected