class Boleite::NoiseRandom

Overview

Noise function based on Squirrel Eiserloh SquirrelNoise function from GDC17

Extended Modules

Defined in:

boleite/random.cr
boleite/serializers/random.cr

Constant Summary

NOISE1 = 3039394381_i64

These bit-noise been selected for having interesting/distinctive bits

NOISE2 = 1759714724
NOISE3 = 458671337

Constructors

Instance Method Summary

Instance methods inherited from class Boleite::Random

contract_ensures_get_int(return_value, min, max) contract_ensures_get_int, contract_post_get_int(check_depth, return_value, min, max) contract_post_get_int, contract_pre_get_int(check_depth, min, max) contract_pre_get_int, contract_requires_get_int(min, max) contract_requires_get_int, get_int(min, max) : UInt32
get_int : UInt32
get_int
, get_zero_to_one : Float64 get_zero_to_one, rand(max : Int) : Int rand, seed seed, test_invariant_contracts(method = "") test_invariant_contracts

Constructor methods inherited from class Boleite::Random

new(seed) new

Macros inherited from class Boleite::Random

assert(test) assert, ensures(test) ensures, invariant(test) invariant, requires(test) requires

Constructor Detail

def self.new(seed, index : UInt32 = 0_u32) #

[View source]

Instance Method Detail

def generate(num) : UInt32 #

[View source]
def generate : UInt32 #

[View source]
def index : UInt32 #

[View source]