FYI,
(x1-x0)*(y2-y1)-(x2-x1)*(y1-y0) is just an equation that returns the distance from a point (x2,y2) to the closest point on a line (x0,y0)-(x1,y1). The cool part of the equation is that it will return negative numbers if a point is left of a line and positive numbers if the point is right of the line and 0 if the point is on the line.
(x1-x0)*(y2-y1)-(x2-x1)*(y1-y0) is just an equation that returns the distance from a point (x2,y2) to the closest point on a line (x0,y0)-(x1,y1). The cool part of the equation is that it will return negative numbers if a point is left of a line and positive numbers if the point is right of the line and 0 if the point is on the line.