add comment
This commit is contained in:
parent
c70ff0d95e
commit
38093f1799
1 changed files with 9 additions and 0 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue