Redigera

Dela via


VBMath Class

Definition

The VbMath module contains procedures used to perform mathematical operations.

public ref class VBMath sealed
[Microsoft.VisualBasic.CompilerServices.StandardModule]
public sealed class VBMath
[<Microsoft.VisualBasic.CompilerServices.StandardModule>]
type VBMath = class
Public Module VBMath
Inheritance
VBMath
Attributes

Examples

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))

Remarks

This module supports the Visual Basic language keywords and run-time library members for generating random numbers.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Randomize()

Initializes the random-number generator.

Randomize(Double)

Initializes the random-number generator.

Rnd()

Returns a random number of type Single.

Rnd(Single)

Returns a random number of type Single.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also