add comment

This commit is contained in:
Zutatensuppe 2021-04-15 21:09:25 +02:00
parent c70ff0d95e
commit 38093f1799

View file

@ -26,6 +26,15 @@ function rectCenter(rect) {
} }
} }
/**
* Returns a rectangle with same dimensions as the given one, but
* location (x/y) moved by x and y.
*
* @param {x, y, w,, h} rect
* @param number x
* @param number y
* @returns {x, y, w, h}
*/
function rectMoved(rect, x, y) { function rectMoved(rect, x, y) {
return { return {
x: rect.x + x, x: rect.x + x,