Math.Atan2 Returns the angle whose tangent is the quotient of two specified numbers.
using System; class Sample { public static void Main() { double x = 1.0; double y = 2.0; double angle; double radians; radians = Math.Atan2(y, x); angle = radians * (180 / Math.PI); Console.WriteLine(radians); Console.WriteLine(angle); } }