containsPoint 方法

bool containsPoint(
  1. Point<num> another
)
继承

测试 another 是否在 this 的内部或边缘上。

实现

bool containsPoint(Point<num> another) {
  return another.x >= left &&
      another.x <= left + width &&
      another.y >= top &&
      another.y <= top + height;
}