%% Team Lab 5: Problem 5) Test insideTri function
% Run several tests on the insideTri function and plots results

%% Test 1) point is inside the triangle. Result should be 1
xcoords = [6 4 3];
ycoords = [2 1 5];
pt = [4 3];
plotTriAndPoint(pt,xcoords,ycoords);
result = insideTri( pt, xcoords, ycoords ); % Is the point in the triangle?
disp(['Test 1 RESULT: ' num2str(result) ' (it should be 1)' ]);

%% Test 2) point is outside the triangle. Result should be 0


%% Test 3) point is on the triangle. Result should be 0.5
