Function to emulate a stick rotation?

Hello,

does anyone have a function like starting for example a 360 degrees turn with left or right axis from the current state of that axis and is willing to share that function?

Thanks in advance.