
Patrick B. answered 03/17/19
Math and computer tutor/teacher
I am confused by the input. You are saying the top left of the rectangle is (4,5) having length 9 and width 3.
Then the other three corners are (13,5) (1,5) and (1,13)
(6,7) is NOT inside that rectangle, so your result is correct.
If this is incorrect, please explain the input, how the rectangle is supposed to be represented.
Typically you input the TOP LEFT corner with the length and width. The other three corners can
be calculated as above. You can then determine if the given point is on or inside the rectangle.