setTo(x, y) → {Phaser.Point}
Sets the x
and y
values of this Point object to the given values.
If you omit the y
value then the x
value will be applied to both, for example:Point.setTo(2)
is the same as Point.setTo(2, 2)
Parameters
Name | Type | Argument | Description |
---|---|---|---|
x | number | The horizontal value of this point. | |
y | number | <optional> | The vertical value of this point. If not given the x value will be used in its place. |
Returns
This Point object. Useful for chaining method calls.
- Source code: geom/Point.js (Line 68)
Please login to continue.