lprect.java

来自「这个是用j2me开发的.而且可以直接运行.只要相应的模拟器!」· Java 代码 · 共 37 行

JAVA
37
字号
/**
 * <p>Title: lipeng</p>
 * <p>Description:
 * You cannot remove this copyright and notice.
 * You cannot use this file without the express permission of the author.
 * All Rights Reserved</p>
 * <p>Copyright: lizhenpeng (c) 2004</p>
 * <p>Company: LP&P</p>
 * @author lizhenpeng
 * @version 1.0.0
 * <p>
 * Revise History
 * </p>
 */

package lipeng;



public class LPRect
{
  public int x;
  public int y;
  public int dx;
  public int dy;
  public static boolean IntersectRect(LPRect rect1, LPRect rect2)
  {
    if ( (rect1.x + rect1.dx > rect2.x) && (rect1.y + rect1.dy > rect2.y)
        &&
        (rect2.x + rect2.dy > rect1.x) && (rect2.y + rect2.dy > rect1.y))
   {
     return true;
   }
   return false;

  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?