i've quite noob geometry question. I have first rect, for example R1(0,0,320, 240), a point P1(20,40), and second rect R2(0,0,640,480), with point P2(40,80) i would like to calculate the position of 2nd rect, that makes two points share one position. In this case it's ofc R2(-20,-40,600, 440), but i need universal formula. I know it's silly, but i've spend 3 hours and can't find answer. Thanks!
the same logic for y-coordinate