fork download
  1. using static System.Console;
  2. using static System.Math;
  3. using static MathUtil;
  4.  
  5. public class Program {
  6. public static void Main() {
  7. WriteLine(DegreeToRadian(45));
  8. WriteLine(RadianToDegree(0.785398163397448));
  9. }
  10. }
  11.  
  12. public static class MathUtil {
  13. public static double DegreeToRadian(double angle) => PI * angle / 180.0;
  14. public static double RadianToDegree(double angle) => angle * (180.0 / PI);
  15. }
  16.  
  17. //https://pt.stackoverflow.com/q/184690/101
Success #stdin #stdout 0.03s 16240KB
stdin
Standard input is empty
stdout
0.785398163397448
45