Math.Sqrt and Atan2 : Math « Development « VB.Net Tutorial






Public Class Tester
    Public Shared Sub Main
        Dim magnitude As Single
        Dim radians As Single

        magnitude = CSng(Math.Sqrt(100 ^ 2 + 120 ^ 2))
        radians = CSng(Math.Atan2(100, 123))


        Console.WriteLine(magnitude)
        Console.WriteLine(radians)
        
    End Sub

End Class
156.205
0.6826226








7.15.Math
7.15.1.Math.Sqrt and Atan2
7.15.2.Math. Cos and Sin
7.15.3.Convert rectangular 3D coordinates to cylindrical coordinates.
7.15.4.Generating random integers.
7.15.5.Math.Round
7.15.6.Randomize
7.15.7.This example demonstrates Math.Max()
7.15.8.Use the Min method to return and display the smaller of two Single variables.