# Combined horizontal and vertical rotation angle?

I am a programmer and I am working on a game tool used in a tank-combat simulator. I usually post my questions on StackOverflow, but this one is Math-only, so I'm guessing this site suits it better.

I am trying to calculate the "Effective Armour Thickness" of a metal plate being used as sloped armor on a tank.

For a perfectly horizontal and lined shot to the front of the tank, the angle is simply the same of the slope. But if the tank is rotated a little on it's axis, the angle is a compound of the horizontal and vertical rotations.

Basically, I am trying to calculate the same as is calculated in this page's "Combined angle calculator", but I don't know the formula being used.

While searching for a solution, I have found this article, but it doesn't seems to be it that I want.

What is the correct formula to achieve the same results that the "Combined angle calculator" outputs?

combinedAngle = (90 - (acos(cos((90 - Angle_A) * PI / 180) * cos((90 - Angle_B) * PI / 180)) / PI * 180))