code: public static double calculateSlope( GridNode node, double flowValue ) {
          double value = doubleNovalue;
          if (!isNovalue(flowValue)) {
              int flowDir = (int) flowValue;
              if (flowDir != 10) {
                  Direction direction = Direction.forFlow(flowDir);
                  double distance = direction.getDistance(node.xRes, node.yRes);
                  double currentElevation = node.elevation;
                  double nextElevation = node.getElevationAt(direction);
                  value = (currentElevation - nextElevation) / distance;
              }
          }
          return value;
      }
docs: Calculates the slope of a given flowdirection value in currentCol and currentRow.
  
  @param node the current {@link GridNode}.
  @param flowValue the value of the flowdirection.
  @return