algorithms in arrays

Hi,
i was trying to find algorithms that would allow me to move in 2 dimensional array above, below and in main diagonal and also that other one. Could you send me ready algorithms to use?
Thanks.
up is row +1 or row -1 from where you are. down is the opposite. left and right are column changes. diagonal is one row and one column change (for a square setup, for nonsquare it may be a ratio). There really isn't any special algorithm here.
Topic archived. No new replies allowed.