Math.Atan returns the angle whose tangent is the specified number.
Imports System
Class Sample
Public Shared Sub Main()
Dim x As Double = 1.0
Dim y As Double = 2.0
Dim angle As Double
Dim radians As Double
Dim result As Double
angle = 30
radians = angle *(Math.PI / 180)
result = Math.Tan(radians)
Console.WriteLine("The tangent of 30 degrees is {0}.", result)
radians = Math.Atan(result)
angle = radians *(180 / Math.PI)
Console.WriteLine("The previous tangent is equivalent to {0} degrees.", angle)
End Sub 'Main
End Class 'Sample
Related examples in the same category