code: public static int toIsoDirection (int dir)
      {
          if (dir != DirectionCodes.NONE) {
              // rotate the direction clockwise (ie. change SOUTHEAST to
              // SOUTH)
              dir = DirectionUtil.rotateCW(dir, 2);
          }
          return dir;
      }
docs: Converts a non-isometric orientation (where north points toward the
  top of the screen) to an isometric orientation where north points
  toward the upper-left corner of the screen.