Rename PRNG

This commit is contained in:
2026-06-26 15:49:10 +01:00
parent e4c1068281
commit cdca775681
3 changed files with 15 additions and 15 deletions
+5 -5
View File
@@ -17,7 +17,7 @@ wp_intern u64 split_mix_64(SplitMix64State *state);
wp_intern void seed_os_generator(void);
wp_intern u64 generate_random_number(void);
XOR256State wapp_prng_xorshift_init_state(void) {
WpXor256State wpPrngXorshiftInit(void) {
wp_persist b8 seeded = false;
if (!seeded) {
seeded = true;
@@ -26,7 +26,7 @@ XOR256State wapp_prng_xorshift_init_state(void) {
SplitMix64State sm64 = {.seed = generate_random_number()};
return (XOR256State){
return (WpXor256State){
.x = split_mix_64(&sm64),
.y = split_mix_64(&sm64),
.z = split_mix_64(&sm64),
@@ -34,7 +34,7 @@ XOR256State wapp_prng_xorshift_init_state(void) {
};
}
u64 wapp_prng_xorshift_256(XOR256State *state) {
u64 wpPrngXorshift256(WpXor256State *state) {
u64 t = state->x ^ (state->x << 11);
state->x = state->y;
@@ -45,7 +45,7 @@ u64 wapp_prng_xorshift_256(XOR256State *state) {
return state->w;
}
u64 wapp_prng_xorshift_256ss(XOR256State *state) {
u64 wpPrngXorshift256ss(WpXor256State *state) {
const u64 result = rol64(state->z * 5, 7) * 9;
const u64 t = state->z << 17;
@@ -60,7 +60,7 @@ u64 wapp_prng_xorshift_256ss(XOR256State *state) {
return result;
}
u64 wapp_prng_xorshift_256p(XOR256State *state) {
u64 wpPrngXorshift256p(WpXor256State *state) {
const u64 result = state->w + state->x;
const u64 t = state->z << 17;