I'm not sure what is going on but I'm sure that there is something wrong in the program.
When the pitch is -PI/2 (-90º) or PI/2 (90º) you should be looking straight down/up and as such you should have the bottom/top skybox face stright in front which means that you should only see the bottom/top face. But if you look at the application you will
notice of you see exactly half of the bottom/up and side faces which means that you pitch is only but instead you will see that it is appearing at an angle of -PI/4 (-45º) or PI/4 (45º).
What is going on here?