isSameXDirection method
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;
}