Rand

class Rand(pointer: <Error class: unknown class><<Error class: unknown class>>) : ProxyInstance

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

Skipped during bindings generation

  • parameter seed: Unsupported pointer to primitive type

  • parameter seed: Unsupported pointer to primitive type

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val glibRandPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val handle: <Error class: unknown class>?

Functions

Link copied to clipboard
fun copy(): Rand

Copies a #GRand into a new one with the same exact state as before. This way you can take a snapshot of the random number generator for replaying later.

Link copied to clipboard
fun double(): <Error class: unknown class>

Returns the next random #gdouble from @rand_ equally distributed over the range [0..1).

Link copied to clipboard
fun doubleRange(begin: <Error class: unknown class>, end: <Error class: unknown class>): <Error class: unknown class>

Returns the next random #gdouble from @rand_ equally distributed over the range [@begin..@end).

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Compare two proxy instances for equality. This will compare both the type of the instances, and their memory addresses.

Link copied to clipboard
fun free()

Frees the memory allocated for the #GRand.

Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun int(): <Error class: unknown class>

Returns the next random #guint32 from @rand_ equally distributed over the range 0..2^32-1.

Link copied to clipboard
fun intRange(begin: <Error class: unknown class>, end: <Error class: unknown class>): <Error class: unknown class>

Returns the next random #gint32 from @rand_ equally distributed over the range @begin..@end-1.

Link copied to clipboard
fun setSeed(seed: <Error class: unknown class>)

Sets the seed for the random number generator #GRand to @seed.