dagor.random
module ‘dagor.random’
Source file: prog/gameLibs/quirrel/bindQuirrelEx/random.cpp
Usage:
let { rnd, frnd, srnd, rnd_float, rnd_int, set_rnd_seed, get_rnd_seed, gauss_rnd, uint32_hash, uint_noise1D, uint_noise2D, uint_noise3D } = require("dagor.random")
or:
from "dagor.random" import *
//'dagor.random' exports:
{
function rnd(): -> integer
function frnd(): -> float
function srnd(): -> float
function rnd_float(a, b): float, float -> float
function rnd_int(a, b): integer, integer -> integer
function set_rnd_seed(seed): integer -> null
function get_rnd_seed(): -> integer
function gauss_rnd(arg0): integer_or_float -> _undocumented_
function uint32_hash()
function uint_noise1D()
function uint_noise2D()
function uint_noise3D()
}
- function rnd()
- Returns
integer
- function frnd()
- Returns
float
- function srnd()
- Returns
float
- function rnd_float(a, b)
- Arguments
a (
float()
) –b (
float()
) –
- Returns
float
- function rnd_int(a, b)
- Arguments
a (
integer()
) –b (
integer()
) –
- Returns
integer
- function set_rnd_seed(seed)
- Arguments
seed (
integer()
) –
- Returns
null
- function get_rnd_seed()
- Returns
integer
- function gauss_rnd(arg0)
- Arguments
arg0 (
integer_or_float()
) – autodoc from typemask/paramscheck
nparamscheck:2
typecheck mask: any_type, integer_or_float
- function uint32_hash()
- function uint_noise1D()
- function uint_noise2D()
- function uint_noise3D()