Maybe I'm misunderstanding... Math.wrap will return a number between 0 and 9, even though at line 80 in the code above, k itself will be somewhere around 40.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Maybe I'm misunderstanding...
Math.wrap
will return a number between 0 and 9, even though at line 80 in the code above,k
itself will be somewhere around40
.In your uploaded code:
The return value of
Math.wrap
isn't being used, so you might as well be doing: