MCPcopy Index your code
hub / github.com/processing/processing / flipArrayOnX

Method flipArrayOnX

core/src/processing/opengl/Texture.java:946–967  ·  view source on GitHub ↗

Flips intArray along the X axis. @param intArray int[] @param mult int

(int[] intArray, int mult)

Source from the content-addressed store, hash-verified

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 /**

Callers 2

setMethod · 0.95
getMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected