What is the method for converting radians to degrees?

后端 未结 12 2681
慢半拍i
慢半拍i 2020-12-02 05:24

I run into this occasionally and always forget how to do it.

One of those things that pop up ever so often.

Also, what\'s the formula to convert angles expre

12条回答
  •  时光说笑
    2020-12-02 06:01

    For double in c# this might be helpful:

            public static double Conv_DegreesToRadians(this double degrees)
            {
                //return degrees * (Math.PI / 180d);
                return degrees * 0.017453292519943295d;
            }
            public static double Conv_RadiansToDegrees(this double radians)
            {
                //return radians * (180d / Math.PI);
                return radians * 57.295779513082323d;
            }
    

提交回复
热议问题