getDoubleAt method

double getDoubleAt(
  1. Direction direction
)

Implementation

double getDoubleAt(Direction direction) {
  var value;
  switch (direction) {
    case Direction.NW:
      value = _raster.getDouble(_col - 1, _row - 1);
      break;
    case Direction.N:
      value = _raster.getDouble(_col, _row - 1);
      break;
    case Direction.EN:
      value = _raster.getDouble(_col + 1, _row - 1);
      break;
    case Direction.E:
      value = _raster.getDouble(_col + 1, _row);
      break;
    case Direction.SE:
      value = _raster.getDouble(_col + 1, _row + 1);
      break;
    case Direction.S:
      value = _raster.getDouble(_col, _row + 1);
      break;
    case Direction.WS:
      value = _raster.getDouble(_col - 1, _row + 1);
      break;
    case Direction.W:
      value = _raster.getDouble(_col - 1, _row);
      break;
  }
  return value;
}