MCPcopy Create free account
hub / github.com/PerroEngine/Perro / next_chance

Method next_chance

perro_source/api_modules/perro_modules/src/random.rs:392–394  ·  view source on GitHub ↗
(&mut self, probability: f32)

Source from the content-addressed store, hash-verified

390 self.state = self.state.wrapping_add(STREAM_GAMMA as u64);
391 hash_u32(self.state as u32 ^ (self.state >> 32) as u32)
392 }
393
394 #[inline]
395 pub fn next_01(&mut self) -> f32 {
396 self.next_u32() as f32 / u32::MAX as f32
397 }

Callers 2

seeded_rng_helpers_workFunction · 0.80

Calls 2

chanceFunction · 0.85
next_u32Method · 0.80

Tested by 2

seeded_rng_helpers_workFunction · 0.64