Here is my problem (C#) :
double Y = 0.0;
double X = -21.0;
double q1_Test = Math.Atan2(0.0, -21.0); // gives Math.Pi
double q1_Test2 = Math.Atan2(( double)Y, (double)X); // gives Math.Pi
double w1 = <SomeclassInstanceGlobalHere>.getW1(); // This is a class which updates a variable
double w2 = <SomeclassInstanceGlobalHere>.getW2(); // This is a class which updates a variable
double q1 = Math.Atan2(w2, w1); // ** gives -Math.Pi ** ???
//w2 shows 0.0 and w1 shows -21.0
When I get the values from the other class, variable values are 0.0 and -21.0 respectively. It also shows in the IDE while debugging. What is going wrong here?