We use the following fact in determining whether the point (x,y) is inside the transformed triangle.
First we form a vector from the point to each of the three vertices of the triangle. Next, each pair of vectors forms an angle at the point. If the sum of the three angles is strictly less than 360 degrees, then the point is outside the triangle and, in turn, the point is inside the triangle when this condition fails.