Skip to content

Commit

Permalink
update random_math
Browse files Browse the repository at this point in the history
  • Loading branch information
nukeulater committed Dec 29, 2023
1 parent 8379ef4 commit 78470dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xlive/Blam/Engine/math/random_math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
#define DIV_BY_MAX_MASK_REAL (RANDOM_FLONE / (real32)RANDOM_MASK)

// get the HIGH bits of the seed (between 65535 ... 0)
#define SEED_HIWORD(seed) (seed >> 16)
#define SEED_HIWORD(seed) ((seed) >> 16)

// integer random
#define INTEGER_RANDOM(seed) ((SEED_HIWORD(seed)))
#define INTEGER_RANDOM(seed) SEED_HIWORD(seed)
#define INTEGER_RANDOM_RANGE(seed, lower_bound, delta) ((lower_bound) + (((delta) * INTEGER_RANDOM(seed)) >> 16))

// floating point random
Expand Down

0 comments on commit 78470dd

Please sign in to comment.