@phaserjs/phaser
Version:
13 lines (12 loc) • 368 B
JavaScript
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2020 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
export function CeilRectangle(rect) {
rect.x = Math.ceil(rect.x);
rect.y = Math.ceil(rect.y);
rect.width = Math.ceil(rect.width);
rect.height = Math.ceil(rect.height);
return rect;
}