Gjsify LogoGjsify Logo

The GRand struct is an opaque data structure. It should only be accessed through the g_rand_* functions.

record

Hierarchy

  • Rand

Index

Constructors

Properties

name: string

Methods

  • double(): number
  • Returns the next random #gdouble from rand_ equally distributed over the range [0..1).

    Returns number

  • doubleRange(begin: number, end: number): number
  • Returns the next random #gdouble from rand_ equally distributed over the range [begin..end).

    Parameters

    • begin: number

      lower closed bound of the interval

    • end: number

      upper open bound of the interval

    Returns number

  • free(): void
  • int(): number
  • Returns the next random #guint32 from rand_ equally distributed over the range [0..2^32-1].

    Returns number

  • intRange(begin: number, end: number): number
  • Returns the next random #gint32 from rand_ equally distributed over the range [begin..end-1].

    Parameters

    • begin: number

      lower closed bound of the interval

    • end: number

      upper open bound of the interval

    Returns number

  • setSeed(seed: number): void
  • Sets the seed for the random number generator #GRand to seed.

    Parameters

    • seed: number

      a value to reinitialize the random number generator

    Returns void

  • setSeedArray(seed: number, seedLength: number): void
  • Initializes the random number generator by an array of longs. Array can be of arbitrary size, though only the first 624 values are taken. This function is useful if you have many low entropy seeds, or if you require more then 32 bits of actual entropy for your application.

    Parameters

    • seed: number

      array to initialize with

    • seedLength: number

      length of array

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method