Question: Consider a triangle with vertices at (0, 0), (1, 0), and (0, 1). Write a function with header [S] = myInsideTriangle(x, y) where S is

 Consider a triangle with vertices at (0, 0), (1, 0), and

Consider a triangle with vertices at (0, 0), (1, 0), and (0, 1). Write a function with header [S] = myInsideTriangle(x, y) where S is the string 'outside' if the point (x, y) is outside of the triangle, 'border' if the point is exactly on the border of the triangle, and 'inside' if the point is on the inside of the triangle

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!