, Miki, ...
, ( , )... !
y , . (y ) . , , ++ <math.h> include atan2(y,x) ( , ).
, , ( ), , atan2 y x. - :
Point pt1, pt2, pt3, pt4;
RotatedRect rect;
rect.center = (pt1 + pt2 + pt3 + pt4)/4;
rect.size.width = distance(pt1, pt2);
rect.size.height = distance(pt2, pt3);
rect.angle = atan2(pt2.y-pt1.y, pt2.x-pt1.x);
, width dist(pt1,pt2) dist(pt3,pt4), . height.
angle atan (pt1, pt2) atan (pt3, pt4).