Cody

# Problem 558. Is the Point in a Triangle?

Solution 1982548

Submitted on 19 Oct 2019 by Asif Newaz
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
Triangle = [0, 0; 1, 0; 1, 1]; Points = [0, 0.5] y_correct = 0; assert(isequal(your_fcn_name(Points,Triangle),y_correct))

Points = 0 0.5000 d = 0 -0.5000 e = 1.0000 -0.5000 f = 1.0000 0.5000 g = 63.4349 h = 53.1301 l = 116.5651 y = 0

2   Pass
Triangle = [0, 0; 1, 0; 1, 1]; Points = [0.8, 0.5] y_correct = 1; assert(isequal(your_fcn_name(Points,Triangle),y_correct))

Points = 0.8000 0.5000 d = -0.8000 -0.5000 e = 0.2000 -0.5000 f = 0.2000 0.5000 g = 79.7960 h = 136.3972 l = 143.8068 y = 1

3   Pass
Triangle = [0.8147, 0.9134; 0.9058, 0.6324; 0.1270, 0.0975]; Points = [0.8, 0.7; 0.9, 0.4] y_correct = [1 0]; assert(isequal(your_fcn_name(Points,Triangle),y_correct))

Points = 0.8000 0.7000 0.9000 0.4000 d = 0.0147 0.2134 e = 0.1058 -0.0676 f = -0.6730 -0.6025 g = 118.6356 h = 105.5875 l = 135.7769 y = 1 d = -0.0853 0.5134 e = 0.0058 0.2324 f = -0.7730 -0.3025 g = 10.8630 h = 112.8017 l = 101.9387 y = 1 0