First of all, sorry for my bad english.. but i really want to know how this works.

as you see in the picture, there are 3 points and if leftside is greater than rightside, It means the point p0 is not cross the line(p1 - p2).
I can't understand and where it come from?
I think it is something with gradient(slope).. but don't know why. anyone can help me?
thanks!