Get the angle that is the arc cosine of a complex number in CSharp
Description
The following code shows how to get the angle that is the arc cosine of a complex number.
Example
using System;/* w ww .j ava 2s . co m*/
using System.Numerics;
public class Example
{
public static void Main()
{
Complex[] values = { new Complex(.5, 2),
new Complex(-.3, -.8) };
foreach (Complex value in values)
Console.WriteLine("Cos(ACos({0})) = {1}", value,
Complex.Cos(Complex.Acos(value)));
}
}
The code above generates the following result.