-
Notifications
You must be signed in to change notification settings - Fork 100
Math cleanup and optional new PRNG #476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Thomas Rohloff <[email protected]>
Signed-off-by: Thomas Rohloff <[email protected]>
Signed-off-by: Thomas Rohloff <[email protected]>
Signed-off-by: Thomas Rohloff <[email protected]>
|
some of this change are #215, but mainly not sure if we should move to cglm for all algebra |
Signed-off-by: Thomas Rohloff <[email protected]>
Signed-off-by: Thomas Rohloff <[email protected]>
|
Could you explain more about what PRNG is? |
A PRNG is a pseudo random number generator. Different to a real random number generator it isn't really random but pseudo, meaning it uses a seed and deterministic math to get random numbers. PRNGs are normally used when the randomness doesn't need to be secure but fast. See also: https://en.wikipedia.org/wiki/Pseudorandom_number_generator |
|
Oh and in case you ask why change it? The mario kart / vanilla kart PRNG seems to be extremely simple and as a result biased towards specific numbers. This causes effects such as multiple players getting the same items in a row. With this PR it is possible to use the PrNG from the C standart library instead which is used in countless software and probably way less biased towards specific numbers. |
Signed-off-by: Thomas Rohloff <[email protected]>
THis removes some duplicated math function, removes local return values from math functions and adds the option to use the pseudo random number generator of the C library.