clipped from: www.mathbin.net   
Distance between the line ax+by+c=0 and point (X,Y) is:
|\frac{aX+bY+c)}{\sqrt{a^2+b^2}}|