Floor rotation in relation to x axis

Hello guys,

I want to rotate rebar in order to fit inside a certain floor. The problem is that the rebar definition is set to the coordinates 0,0,0 and they go along the X and Y axis, and if I have a rotated floor they still go along those lines, as seen in the image below.


My idea to solve the problem is to get the rotation of the floor in relation to the X axis by finding the biggest side of the floor and measure it’s rotation to X axis. So far i can find the biggest side but i cant read it’s rotation.

Thank you in advance.