phaser/v3/src/geom/rectangle/Scale.js

15 lines
239 B
JavaScript
Raw Normal View History

2016-12-20 17:07:16 +00:00
/**
* Scales the width and height of this Rectangle by the given amounts.
*/
var Scale = function (rect, x, y)
{
if (y === undefined) { y = x; }
rect.width *= x;
rect.height *= y;
return rect;
};
module.exports = Scale;