Skip to content

RandomNumberGenerator

Eduard Gushchin edited this page Jun 21, 2026 · 5 revisions

RandomNumberGenerator

Back to API Reference

Namespace: Electron2D

Summary

Represents the random number generator type.

Declaration

public class Electron2D.RandomNumberGenerator : Electron2D.RefCounted

Remarks

This type is part of the Electron2D 0.1.0 Preview public API.

Thread Safety

Instances of this type are not synchronized. Access them from the thread that owns the object unless the member documentation states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

Members

Member Kind Summary
Seed Property Gets or sets the seed value.
State Property Gets or sets the state value.
Electron2D.RandomNumberGenerator() Constructor Initializes a new instance of the RandomNumberGenerator type.
Randf() Method Executes the randf operation.
RandfRange(System.Single, System.Single) Method Executes the randf range operation.
Randfn(System.Single, System.Single) Method Executes the randfn operation.
Randi() Method Executes the randi operation.
RandiRange(System.Int32, System.Int32) Method Executes the randi range operation.
Randomize() Method Executes the randomize operation.

Member Details

Seed

Kind: Property

public System.UInt64 Seed { get; set; }

Summary

Gets or sets the seed value.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current seed value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.RandomNumberGenerator

State

Kind: Property

public System.UInt64 State { get; set; }

Summary

Gets or sets the state value.

Remarks

This property follows the validation and lifetime rules of its declaring type.

Value

The current state value.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.RandomNumberGenerator

Electron2D.RandomNumberGenerator()

Kind: Constructor

public Electron2D.RandomNumberGenerator()

Summary

Initializes a new instance of the RandomNumberGenerator type.

Remarks

The new instance follows the lifetime and validation rules of its declaring type.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.RandomNumberGenerator

Randf()

Kind: Method

public System.Single Randf()()

Summary

Executes the randf operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

The result of the operation.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.RandomNumberGenerator

RandfRange(System.Single, System.Single)

Kind: Method

public System.Single RandfRange(System.Single, System.Single)(System.Single from, System.Single to)

Summary

Executes the randf range operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • from: The from value.
  • to: The to value.

Returns

The result of the operation.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.RandomNumberGenerator

Randfn(System.Single, System.Single)

Kind: Method

public System.Single Randfn(System.Single, System.Single)(System.Single mean, System.Single deviation)

Summary

Executes the randfn operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • mean: The mean value.
  • deviation: The deviation value.

Returns

The result of the operation.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.RandomNumberGenerator

Randi()

Kind: Method

public System.UInt32 Randi()()

Summary

Executes the randi operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Returns

The result of the operation.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.RandomNumberGenerator

RandiRange(System.Int32, System.Int32)

Kind: Method

public System.Int32 RandiRange(System.Int32, System.Int32)(System.Int32 from, System.Int32 to)

Summary

Executes the randi range operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Parameters

  • from: The from value.
  • to: The to value.

Returns

The result of the operation.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.RandomNumberGenerator

Randomize()

Kind: Method

public System.Void Randomize()()

Summary

Executes the randomize operation.

Remarks

This method follows the validation and lifetime rules of its declaring type.

Thread Safety

This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.

Since

This API is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.RandomNumberGenerator

Clone this wiki locally