How to get angle of an contour in 360 degree

Hi , I am Trying to detect shape of an object and its angle from an image .By using those angle and contour data ,I have to rotate rectangle region with corresponding to contours angle in 360 degree but by using

`double d_match=cv::matchShapes(contours[0],contours_search[i],1,0.0);

cv::RotatedRect minRect = minAreaRect( contours_search[ki] );`
I am only getting an angle within range of 0-90 degree.if the object in image is in certain angel then I need to rotate rectangle region with respect to contour angle .
Please provide me some possible solution .

there is none. arctan repeats in -90° … +90°

by using arctan , I am able to get -90° to +90° but Ineed to get angle in 360°.
in my application i have to extract data of contour in register image and store it,in real time I am also need to extract contour data from camera image and need to calculate the angle of contour is change from register image then I have to compute rectangle region angle with respect to changed contour angle