Math.Round : Math « Development « VB.Net Tutorial






Public Class Tester
    Public Shared Sub Main
    
        Dim digits As Integer

        For digits = 0 To 5
            Console.WriteLine(Math.Round(Math.PI, digits))
        Next digits
     End Sub

End Class
3
3.1
3.14
3.142
3.1416
3.14159








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.