Tested if point lies inside rectangle