⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 doublerectangle.java

📁 利用JAVA编写的群体机器人局部通讯完成一定得队形控制
💻 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 + -