Phaser API Documentation

  Version: 
<static> MergeXY(target, x, y)

Description:

Merges a Rectangle with a point by repositioning and/or resizing it so that the point is on or within its bounds.

Parameters:

name type description
target Phaser.Geom.Rectangle

The Rectangle which should be merged and modified.

x number

The X coordinate of the point which should be merged.

y number

The Y coordinate of the point which should be merged.

Returns:
Description:

The modified target Rectangle.

Since: 3.0.0