mirror of
https://github.com/photonstorm/phaser
synced 2024-11-28 07:31:11 +00:00
Defaults y to x if not given
This commit is contained in:
parent
6accb89ff0
commit
66fc40845b
1 changed files with 2 additions and 0 deletions
|
@ -16,6 +16,8 @@ var Vector2 = new Class({
|
|||
}
|
||||
else
|
||||
{
|
||||
if (y === undefined) { y = x; }
|
||||
|
||||
this.x = x || 0;
|
||||
this.y = y || 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue