isSameXDirection method

bool isSameXDirection(
  1. double x
)

Implementation

bool isSameXDirection(double x) {
  if (x > 0 && (this == right || this == upRight || this == downRight)) {
    return true;
  }

  if (x < 0 && (this == left || this == upLeft || this == downLeft)) {
    return true;
  }
  return false;
}