How would I find the angle of the walls?
I would think it would find the poles of the walls and subtract and orientation.
If I calculate the one in the picture, it will try to return 90
You could just do the subtraction method you suggested, depending on what exactly you need it could work. Have you tried it? If not, see if it works and let us know if there are any issues.
It kinda works but now its returning 270 for some of the 90 degree angles.