What is the basic calculation or formula to calculate what cells are passed through in a 2 dimensional checkerboard like grid in a move between cells ?

Say I am at x1,y2 and I want to move to x2,y2. I want to calculate all the cell coordinates I have to pass through in that move. Sorry if my math is a bit rusty, but offhand I am not sure what the formula is ..