Convert radians to degrees. - CSharp System

CSharp examples for System:Math Number

Description

Convert radians to degrees.

Demo Code

// Licensed under the Apache License, Version 2.0 (the "License");
using System;// w  w w. j a va  2 s  .co  m

public class Main{
        /// <summary>
        /// Convert radians to degrees.
        /// </summary>
        /// <param name="rad">Radians.</param>
        /// <returns>Degrees.</returns>
        public static double Rad2Deg(double rad)
        {
            return rad*(180.0/Math.PI);
        }
}

Related Tutorials