slope intercept to the general form in computer code?

59 Views Asked by At

I want to make a function that converts a straight line equation from slope intercept to the general form in computer code I already know how to do the opposite :

def general2Si(A,B,C):
m=-A/B
b=-C/B
return m,b