bresenham line drawing

hi i am new to this field…i wanted to know what
the function f(x,y) which is the equation of the line gives.If u give a point above the line we get a negative value.if we give a point below the line it gives a positive value.Is there a particular formula (like it could be the perpendicular distance from the point to the line)for it?

Originally posted by ssheth:
Is there a particular formula (like it could be the perpendicular distance from the point to the line)for it?
If I don’t go wrong it should be the distance on the y axis from the point to the line. Depending on how you pick the a & b coefficients of the equation you’ll get it positive above the line and negative below or the other way around.