From 38093f17999efe68cf6317e9689eb0a351232a27 Mon Sep 17 00:00:00 2001 From: Zutatensuppe Date: Thu, 15 Apr 2021 21:09:25 +0200 Subject: [PATCH] add comment --- common/Geometry.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/common/Geometry.js b/common/Geometry.js index 8dfab23..82dd6f6 100644 --- a/common/Geometry.js +++ b/common/Geometry.js @@ -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) { return { x: rect.x + x,