That would be ATan2( ydif, xdif ).
ATan will give the same result for ATan( ydif / xdif ) and ATan( -ydif / -xdif ). Thus it is good only for a 180 degree range.
ATan will give the same result for ATan( ydif / xdif ) and ATan( -ydif / -xdif ). Thus it is good only for a 180 degree range.