Simimilar problem to http://stackoverflow.com/questions/1957801/math-atan2-or-class-instance-problem-in-c and http://stackoverflow.com/questions/1193630/add-two-double-given-wrong-result
It is something that simple lines:
public static String DegreeToRadianStr(Double degree)
{
Double piBy180 = (Math.PI / 180);
Double Val = (piBy180 * degree); // Here it is giving wrong value
}
piBy180 * degree = -3.1415926535897931 but Val = -3.1415927410125732
I really have no clue what to do .. Please ask some questions regarding this, so that I can point out where it is going wrong.
It is amazing that piBy180 is keeping correct value.
Same thing is happening with other functions too, But some how I manipulated to get correct values.
I am using MS Visual Studio's C#.net SP1.