I decide to rotate the NxN matrix in place .
It seems that my code is making a rotation, but leaving X above the image.
Therefore, I assume that it rotates the edges incorrectly. I am attaching two images as an input and output sample.


What is wrong with my code:
public static void rotateRight(float[][] img){ for (int i=0; i<N/2; i++){ for (int j=i; j<Ni; j++){ int J_COMP = Nj-1;
java arrays image-rotation
Trevor
source share