VbMath Module (Visual Basic)
The VbMath module contains procedures used to perform mathematical operations.
Remarks
This module supports the Visual Basic language keywords and run-time library members for generating random numbers.
Members
|
|
Example
This example uses the Rnd function to generate a random integer value in the range from 1 to 6.
' Initialize the random-number generator.
Randomize()
' Generate random value between 1 and 6.
Dim value As Integer = CInt(Int((6 * Rnd()) + 1))
See Also
Reference
Derived Math Functions (Visual Basic)
Visual Basic Language Keywords