Math.PI : Math « System « C# / C Sharp by API






Math.PI

  

using System;
using System.Data;


class Class1{
        static void Main(string[] args){
            Console.WriteLine(ConvertDegreesToRadians (180));

            Console.WriteLine(ConvertDegreesToRadians (90));

            Console.WriteLine(ConvertDegreesToRadians (30));

        }
    public static double ConvertDegreesToRadians (double degrees)
    {
      double radians = (Math.PI / 180) * degrees;
      return (radians);
    }  
}

   
    
  








Related examples in the same category

1.Math.Abs
2.Math.Cos()
3.Math.Min
4.Math.Round
5.Math.Sign
6.Math.Sin()
7.Math.Sqrt
8.Math.Tan()