let is_in_rect (x,y) r_x r_y r_w r_h = ((r_x < x) && (x < r_x + r_w)) && ((r_y < y) && (y < r_y + r_h))