It's a library I use when I teach kids JavaScript. It provides simple global functions to let them get started before they have to deal with ideas such as canvas context objects.
A Wiki page showing the functions they get to use is at http://fingswotidun.com/code/index.php/API
The functions you show here are exactly the sort of thing that would be useful for beginners.
Use rotate(), translate(), and scale() instead of doing your own math.
I'm more excited about Path2D[0] becoming adopted by more browsers.
[0] https://developer.mozilla.org/en-US/docs/Web/API/Path2D
See String.prototype.contains → String.prototype.includes because mootools extended the String prototype[1]
[1] - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
You can rearrange the code to accept a context as the first argument if you are worried.
It's a library I use when I teach kids JavaScript. It provides simple global functions to let them get started before they have to deal with ideas such as canvas context objects.
A Wiki page showing the functions they get to use is at http://fingswotidun.com/code/index.php/API
The functions you show here are exactly the sort of thing that would be useful for beginners.