C# Math PI
Description
Math PI
represents the ratio of the circumference of a
circle to its diameter, specified by the constant, PI.
Syntax
Math.PI
has the following syntax.
public const double PI
Example
The following code shows how to use Math.PI.
using System;//ww w.ja v a2 s. com
public class MainClass{
public static void Main(String[] argv){
System.Console.WriteLine(2*Math.PI);
}
}
The code above generates the following result.