Given the input:
double x1,y1,x2,y2;
How can I find the general form equation (double a,b,c where ax + b
Get the tangent by subtracting the two points (x2-x1, y2-y1). Normalize it and rotate by 90 degrees to get the normal vector (a,b). Take the dot product with one of the points to get the constant, c.
(x2-x1, y2-y1)
(a,b)
c