containsVec method

bool containsVec(
  1. VectorBase vector
)

Returns true if vector is anywhere within the columns and rows enclosed by this rectangle.

Implementation

bool containsVec(VectorBase vector) {
  if (vector.x >= left &&
      vector.x < right &&
      vector.y >= top &&
      vector.y < bottom) {
    return true;
  } else {
    return false;
  }
}