Flips intArray along the X axis. @param intArray int[] @param mult int
(int[] intArray, int mult)
| 944 | * @param mult int |
| 945 | */ |
| 946 | protected void flipArrayOnX(int[] intArray, int mult) { |
| 947 | int index = 0; |
| 948 | int xindex = mult * (width - 1); |
| 949 | for (int x = 0; x < width / 2; x++) { |
| 950 | for (int y = 0; y < height; y++) { |
| 951 | int i = index + mult * y * width; |
| 952 | int j = xindex + mult * y * width; |
| 953 | |
| 954 | for (int c = 0; c < mult; c++) { |
| 955 | int temp = intArray[i]; |
| 956 | intArray[i] = intArray[j]; |
| 957 | intArray[j] = temp; |
| 958 | |
| 959 | i++; |
| 960 | j++; |
| 961 | } |
| 962 | |
| 963 | } |
| 964 | index += mult; |
| 965 | xindex -= mult; |
| 966 | } |
| 967 | } |
| 968 | |
| 969 | |
| 970 | /** |