📄 coordinate.js
字号:
Coordinate = Class.create();
Coordinate.prototype = {
initialize: function(x, y){
this.x = x;
this.y = y;
},
isSame: function(coord){
if (this.x == coord.x && this.y == coord.y)
return true;
return false;
},
getBound: function(width, height){
return new Bound(this.x-width/2, this.x+width/2, this.y-height/2, this.y+height/2);
},
getPoint: function(){
return new Point(this.x/1e16,this.y/1e16);
},
toString: function(){
return 'X:'+this.x+',Y:'+this.y;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -