/** * See how far we have gone in which direction since last going the other direction. * * @return The (signed) distance. */ public int getCurrentDistance() { return m_distanceThisDirection * (int) Math.signum(m_lastStep); }
@Override public int compareTo(X that) { // TODO Auto-generated method stub if (this.b == that.b) return this.a - that.a; return (int) Math.signum(that.b - this.b); }
@Override public int compareTo(SearchNode o) { return (int) Math.signum(priority() - o.priority()); }