checking if a point is inside a specified Rectangle

前端 未结 4 1097
既然无缘
既然无缘 2020-12-11 16:41

ok, so i\'m doing an assignment for a Java class and one part of the assignment is to find out if a point is within the dimensions of a rectangle. so I created this code:

4条回答
  •  悲哀的现实
    2020-12-11 17:24

    Usually when dealing with computer graphics, the top left point is (0,0) and the bottom right corner is (width, height).

    This means that you should reverse your conditions

提交回复
热议问题