Solving for variables inside cos() and sin()
    double g[2][2];
    
    g[0][0] = cos(M_PI*0.5*(c - w*0.5));
    g[0][1] = sin(M_PI*0.5*(c - w*0.5));
    
    g[1][0] = cos(M_PI*0.5*(c + w*0.5));
    g[1][1] = sin(M_PI*0.5*(c + w*0.5));


The matrix g is given. How do I rewrite the above to find the value of (c,w)?
Solving for variables inside cos() and sin()
===

    double g[2][2];
    
    g[0][0] = cos(M_PI*0.5*(c - w*0.5));
    g[0][1] = sin(M_PI*0.5*(c - w*0.5));
    
    g[1][0] = cos(M_PI*0.5*(c + w*0.5));
    g[1][1] = sin(M_PI*0.5*(c + w*0.5));


The matrix g is given. How do I rewrite the above to find the value of (c,w)?