trig model FPS angle generation

I have come across a lot of math models lately for 3D camera systems. I am stuck on the easiest, which is so frustrating. Basically to calculate all of the trig functions, one has to know 'the angle'. Or 2. I understand that if the spherical nomenclature is applied to the system, and then translated into cartesian coordinates, this would be explanatory. But I have seen programmers use the cartesian without the spherical system as well.

So, in the trig model, where exactly are the angles coming from that when broken down to the unit circle are used for translation and rotation. Is it a single angle for XZ b/c y = 0? I can figure out the rest of the trig math from here if I can imagine the proper use the angles.

my example with 'w' :

Code :

if (key=='w') //forwards
{
float xrotrad, yrotrad;
yrotrad = (pRot->yrot / 180 * 3.141592654f);
xrotrad = (pRot->xrot / 180 * 3.141592654f);
pPos->xpos += float(sin(yrotrad)) ;
pPos->zpos -= float(cos(yrotrad)) ;
pPos->ypos -= float(sin(xrotrad)) ;
}

Where do the rotation angles come from above, yrotrad, xrotrad etc. Are they more for analysis within unit circle, or do they represent a "heading"?

I think I am overthinking this, but there it is. I think I may be getting these mixed up with vectors.

update on coding rotation function

Thank you for the snippet....my hypothesis is that the result of roty(theta) customized is the same as the glm::rotation function for the same degree input. Its turning out differently. Maybe someone could please point out why??

Code :

glm::mat4 roty(float a) {
float s = std::sin(a);
float c = std::cos(a);
return glm::mat4(
c, 0.0f, -s, 0.0f,
0.0f, 1.0f, 0.0f, 0.0f,
s, 0.0f, c, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f);
}
int main()
{
// per function above
glm::vec4 _vector(4.0f,5.0f,6.0f,1.0f);
glm::mat4 _trans = glm::mat4(1.0f);
_trans = roty(30.0f);
_vector = _vector * _trans;
std::cout<<glm::to_string(_vector)<<std::endl;
// ::glm
glm::vec4 _vector2(4.0f,5.0f,6.0f,1.0f);
glm::mat4 _trans2 = glm::mat4(1.0f);
_trans2 = glm::rotate(_trans2, 30.0f, glm::vec3(0,1,0));
_vector2 = _trans2 * _vector2;
std::cout<<glm::to_string(_vector2)<<std::endl;

Output for theta = 30 degrees(should I convert to radians for these functions?):

vec4(6.545196, 5.000000, -3.026618, 1.000000)

vec4(-5.311184, 5.000000, 4.877635, 1.000000)

Should be identical.