What is probability that a line joining two randomly selected coordinates from set form an angle $45°$ with one of axes? What is probability that a line joining two randomly selected coordinates from a set form an angle $45°$ with one of the axes?  
For example, if we have set of coordinates $$\{(1, 2), (1, 3), (3, 3), (4, 4)\}$$ then, if my calculations is correct, the probability would be $0.125$  
How I calculated this:
Number of ways to select coordinates is $4^2=16$ because even the same coordinates can be selected. To line form an angle $45°$ with one of axes, the slope of line have to be $1$ or $-1$. Out of these $16$ ways only $2$ have slope $1$ or $-1$ so probability is $\frac{2}{16} = 0.125$.   
I am programming an algorithm that computes this probability but the algorithm have to check slope of every combination of coordinates so my question is:
Is there any other/faster way to compute this probability?
EDIT: I don't know if it helps, but coordinates will be only integers.
EDIT 2: Range of coordinates is from $-100000$ to $100000$. Number of coordinates will be no more than $10000$. Also probability will be computed to $6$ decimal places.

Assume that you are given $N$ points
$$(x_i,y_i)\in{\mathbb Z}^2\qquad(1\leq i\leq N)\ .$$ Introduce new coordinates $(u,v)$ in the plane via 
$$u:=x-y, \qquad v:=x+y\ .$$
You then get $N$ new coordinate pairs $(u_i,v_i)\in{\mathbb Z}^2$. Now check for coinciding $u$-, resp. $v$-coordinates of these points, and take care of the resulting multiplicities. E.g., if you find $4$ points with $u_i=5$ you have to count these coincidences with weight ${4\choose2}=6$ towards the probability you are interested in.
