How to convert radians to degrees in C#

1 Answer

0 votes
using System;

class Program
{
    public static double RadiansToDegree(double radians) {
        return (180 / Math.PI) * radians;
    }
    static void Main() {
        Console.WriteLine(RadiansToDegree(1));
        Console.WriteLine(RadiansToDegree(2));
    }
}




 
/*
run:
 
57.2957795130823
114.591559026165
 
*/

 



answered Aug 10, 2023 by avibootz

Related questions

1 answer 103 views
103 views asked Aug 11, 2024 by avibootz
1 answer 118 views
118 views asked Aug 11, 2024 by avibootz
1 answer 119 views
1 answer 123 views
1 answer 127 views
127 views asked Aug 10, 2024 by avibootz
1 answer 189 views
189 views asked Aug 10, 2023 by avibootz
1 answer 132 views
...