code: public static int getIsoDirection (int ax, int ay, int bx, int by)
      {
          // head off a div by 0 at the pass..
          if (bx == ax) {
              if (by == ay) {
                  return DirectionCodes.NONE;
              }
              return (by < ay) ? EAST : WEST;
          }
  
          // figure direction base on the slope of the line
          float slope = ((float) (ay - by)) / ((float) Math.abs(ax - bx));
          if (slope > 2f) {
              return EAST;
          }
          if (slope > .5f) {
              return (bx < ax) ? NORTHEAST : SOUTHEAST;
          }
          if (slope > -.5f) {
              return (bx < ax) ? NORTH : SOUTH;
          }
          if (slope > -2f) {
              return (bx < ax) ? NORTHWEST : SOUTHWEST;
          }
          return WEST;
      }
docs: Given two points in an isometric coordinate system (in which {@link
  #NORTH} is in the direction of the negative x-axis and {@link
  #WEST} in the direction of the negative y-axis), return the compass
  direction that point B lies in from point A.  This method is used
  to determine direction for both tile coordinates and fine
  coordinates within a tile, since the coordinate systems are the
  same.
  
  @param ax the x-position of point A.
  @param ay the y-position of point A.
  @param bx the x-position of point B.
  @param by the y-position of point B.
  
  @return the direction specified as one of the <code>Sprite</code>
  class's direction constants, or <code>DirectionCodes.NONE</code> if
  point B is equivalent to point A.