VBMath VBMath VBMath 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
type VBMath = class
Public Module VBMath
Inheritance
VBMathVBMathVBMathVBMath
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) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
Randomize() Randomize() Randomize() Randomize()

Initializes the random-number generator.

Randomize(Double) Randomize(Double) Randomize(Double) Randomize(Double)

Initializes the random-number generator.

Rnd() Rnd() Rnd() Rnd()

Returns a random number of type Single.

Rnd(Single) Rnd(Single) Rnd(Single) Rnd(Single)

Returns a random number of type Single.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also