mirror of
https://github.com/photonstorm/phaser
synced 2024-12-01 00:49:41 +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
|
else
|
||||||
{
|
{
|
||||||
|
if (y === undefined) { y = x; }
|
||||||
|
|
||||||
this.x = x || 0;
|
this.x = x || 0;
|
||||||
this.y = y || 0;
|
this.y = y || 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue