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

Method flipArrayOnY

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

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

(int[] intArray, int mult)

Source from the content-addressed store, hash-verified

973 * @param mult int
974 */
975 protected void flipArrayOnY(int[] intArray, int mult) {
976 int index = 0;
977 int yindex = mult * (height - 1) * width;
978 for (int y = 0; y < height / 2; y++) {
979 for (int x = 0; x < mult * width; x++) {
980 int temp = intArray[index];
981 intArray[index] = intArray[yindex];
982 intArray[yindex] = temp;
983
984 index++;
985 yindex++;
986 }
987 yindex -= mult * width * 2;
988 }
989 }
990
991
992 /**

Callers 2

setMethod · 0.95
getMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected