Skip to content

Commit b168103

Browse files
committed
fix: use macro instead of duplicating its actual value in le code
1 parent 2a7a08b commit b168103

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/carbon_math.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void carbon_math_mt19937_64_srand(u64 seed) {
4141
u64 *si = &carbon_math__mt19937_64_rand_state_idx;
4242
sv[0] = seed;
4343
for (*si = 1; *si < CARBON_MATH__MT19937_64_RAND_NN; ++(*si)) {
44-
sv[*si] = (6364136223846793005ULL * (sv[*si - 1] ^ (sv[*si - 1] >> 62)) + *si);
44+
sv[*si] = (CARBON_MATH__RAND_PCG_MAGIC * (sv[*si - 1] ^ (sv[*si - 1] >> 62)) + *si);
4545
}
4646
}
4747

0 commit comments

Comments
 (0)