Are you using an Arduino? You never say, but you tagged Arduino. It helps a lot to know.
What rotary encoder are you using? There are lots of them with different features. I’m not aware of any that give an angle.
Are you using some sort of library code? Which one(s)? Can you describe how they work?
Can you describe your problem better, preferabley without all the extra Ps and Hs?
Thanks
EDIT: links to what you are using are very helpful and very much appreciated