Simimilar problem to Math.Atan2 or class instance problem in C# and add two double given wrong result
It is something that simple lines:
public static S
It could just be a string formatting issue. Try adding the line:
Debug.Assert(Val == (piBy180 * degree), "WTF?");
after the assignment. It shouldn't fail, since they are both doubles, and arithmetic operations on them should produce the same binary value.