📄 doublerectangle.java
字号:
package EDU.cmu.cs.coral.localize;public class DoubleRectangle { public double x; public double y; public double width; public double height; /*x,y is top left corner*/ public DoubleRectangle(double xx, double yy, double ww, double hh) { x = xx; y = xx; width = ww; height = hh; } /* note this assumes the rect is in space iwth origin in the middle*/ public boolean contains(double xx, double yy) { if ( xx < x || xx > (x+width)) { return false; } if (yy > y || yy < (y-height)) { return false; } return true; } public String toString() { return new String("("+x+", "+y+") w = "+width+" h = "+height); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -