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

Function hash_u32

perro_source/api_modules/perro_modules/src/random.rs:21–28  ·  view source on GitHub ↗
(mut value: u32)

Source from the content-addressed store, hash-verified

19
20#[inline]
21pub const fn hash_u32(mut value: u32) -> u32 {
22 value ^= value >> 16;
23 value = value.wrapping_mul(0x7feb_352d);
24 value ^= value >> 15;
25 value = value.wrapping_mul(0x846c_a68b);
26 value ^= value >> 16;
27 value
28}
29
30#[inline]
31pub const fn hash_i32(value: i32) -> u32 {

Callers 14

hash_i32Function · 0.70
hash_u64Function · 0.70
hash_u128Function · 0.70
hash_combineFunction · 0.70
hash2_u32Function · 0.70
hash3_u32Function · 0.70
hash_boolFunction · 0.70
hash_f32Function · 0.70
hash_to_u32Method · 0.70
hash_bytesFunction · 0.70
rand_u32Function · 0.70
rand_u32_streamFunction · 0.70

Calls

no outgoing calls

Tested by 1