Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GValiente/butano
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: ggraciadev/butano
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Able to merge. These branches can be automatically merged.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Mar 31, 2023

  1. random set seed

    ggraciadev committed Mar 31, 2023
    Copy the full SHA
    413df87 View commit details
Showing with 8 additions and 0 deletions.
  1. +8 −0 butano/include/bn_random.h
8 changes: 8 additions & 0 deletions butano/include/bn_random.h
Original file line number Diff line number Diff line change
@@ -123,6 +123,14 @@ class random
return minimum + fixed::from_data(int(result));
}

constexpr void set_seed(const unsigned s) {
_x = 123456789 + s;
_y = 362436069;
_z = 521288629;

update();
}

/**
* @brief Updates the value of the internal seed.
*/