I asked this question on stackoverflow:
$AB$ is the line, $C$ is the point.
In the accepted answer of the above question, if the difference in equation is $0$, then points are collinear, so in the above image, it proves it correct as theta is same, so far so good.
Then in the image below, $C$ lies on right of line :
the fi angle is less than theta so the difference is positive. So in my program if I take $> 0$ as condition for the point on right, then the difference should always be greater than $0$ if point is on right.
But my next figure shows that the even if the point is on right of the line, the difference can be negative :
In figure 3, even though the point is on right of the line, fi is greater than theta, so the diffrence is negative.
In accepted answer, if I take positive difference for point on right side, then the above case will give wrong results.
Where am I going wrong ?