code: public static double distancePointLine(double pointX, double pointY, double a, double b, double c) {
          double denom = Math.sqrt(a * a + b * b);
          return (a * pointX + b * pointY + c) / denom;
      }
docs: Determine the signed distance of the given point <code>(pointX, pointY)</code> to the line specified via its general plane equation
  <i>a*x + b*y + c = 0</i>.
  <p>
  Reference: <a href="http://mathworld.wolfram.com/Point-LineDistance2-Dimensional.html">http://mathworld.wolfram.com</a>
  
  @param pointX
  the x coordinate of the point
  @param pointY
  the y coordinate of the point
  @param a
  the x factor in the plane equation
  @param b
  the y factor in the plane equation
  @param c
  the constant in the plane equation
  @return the distance between the point and the line