Hi Guys,
This is a function that can rotate a 256 element array:
Anyone want to have a crack at the other direction?
No matter what I try I break it.
I realise I can just replace the 1 for 255 and use this for the same effect
as the other direction, but that takes too much time for the application.
Cheers, Art.
This is a function that can rotate a 256 element array:
Problem is it rotates in the wrong direction.int ii, jj;
for (ii = 1; ii <=1; ii++) {
for (jj = 256-1; jj > 0; jj--) {
colours[jj-1] = colours[jj-1] + colours[jj];
colours[jj] = colours[jj-1] - colours[jj];
colours[jj-1] = colours[jj-1] - colours[jj];
}}
Anyone want to have a crack at the other direction?
No matter what I try I break it.
I realise I can just replace the 1 for 255 and use this for the same effect
as the other direction, but that takes too much time for the application.
Cheers, Art.