How to get the exact rotation that is in Transform?

I used Rigidbody.angularVelocity to make the game object rotate, and when I go to get the object’s rotation, I get a different rotation than the Transform

@alexlukanga

Hello!

I assume your code is not correct so I found out this way to find the rotation of an object

float x;
void Update () 
    {
        x += Time.deltaTime * 10;
        transform.rotation = Quaternion.Euler(x,0,0);
    }

Hope This Helps!