Example #1
0
 /**
  * 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);
 }
Example #2
0
 @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);
 }
Example #3
0
 @Override
 public int compareTo(SearchNode o) {
   return (int) Math.signum(priority() - o.priority());
 }