How do I compare 2 coordinate systems? or 2 UV channels

Hey guys, I’m trying to compare 2 uv channels, and I want to get a normalized value for the rotation difference, so if its 180° I want 0.5 if its 90° I want 0.25

here are the 2 uv channels and the expected result (photoshoped image)