Progress
This commit is contained in:
15
scripts/pos.js
Normal file
15
scripts/pos.js
Normal file
@@ -0,0 +1,15 @@
|
||||
function Pos(x,y)
|
||||
{
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
|
||||
this.toString = function()
|
||||
{
|
||||
return x+","+y;
|
||||
}
|
||||
|
||||
this.sub = function(pos2)
|
||||
{
|
||||
return new Pos(this.x - pos2.x,this.y - pos2.y)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user