コード例 #1
0
  public static int[][] eval(
      int[][] dest, NslInt2 num, int start1, int start2, int end1, int end2) {

    int[][] _data = num.get();

    if (start1 < 0) start1 = 0;
    if (start2 < 0) start2 = 0;
    if (end1 > _data.length) end1 = _data.length;
    if (end2 > _data[0].length) end2 = _data[0].length;

    return eval(dest, _data, start1, start2, end1, end2);
  }
コード例 #2
0
  public static int[][] eval(NslInt2 num, int start1, int start2, int end1, int end2) {

    int[][] _data = num.get();

    if (start1 < 0) start1 = 0;
    if (start2 < 0) start2 = 0;
    if (end1 > _data.length) end1 = _data.length;
    if (end2 > _data[0].length) end2 = _data[0].length;

    int length1 = end1 - start1 + 1;
    int length2 = end2 - start2 + 1;

    return eval(new int[length1][length2], _data, start1, start2, end1, end2);
  }