rectToRect method

bool rectToRect(
  1. DFRect other
)

矩形碰撞

Implementation

bool rectToRect(DFRect other) {
  if (right <= other.left || other.right <= left) return false;
  if (bottom <= other.top || other.bottom <= top) return false;
  return true;
}