Example 37: Determine the Position of a Point

Learn how to determine the position of a point in a rectangle.

Problem

Write a function that receives coordinates of the bottom left corner of a rectangle, its width, height, and coordinates of a point and determines whether the point lies inside, outside, or on the rectangle.

Get hands-on with 1400+ tech skills courses.