Checking to see if 3 points are on the same line
You can check if the area of the ABC triangle is 0: [ Ax * (By – Cy) + Bx * (Cy – Ay) + Cx * (Ay – By) ] / 2 Of course, you don’t actually need to divide by 2.
You can check if the area of the ABC triangle is 0: [ Ax * (By – Cy) + Bx * (Cy – Ay) + Cx * (Ay – By) ] / 2 Of course, you don’t actually need to divide by 2.