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
Adding explanation to seeded rng used in examples #12593
Adding explanation to seeded rng used in examples #12593
Conversation
bb8ec67
to
91e429e
Compare
examples/3d/spotlight.rs
Outdated
@@ -48,6 +48,8 @@ fn setup( | |||
)); | |||
|
|||
// cubes | |||
|
|||
// Make it play out the same way every time with deterministic results. We do this for testing purposes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Make it play out the same way every time with deterministic results. We do this for testing purposes. | |
// Make it deterministic for testing purposes. |
I personally don't like "make it play out" as a phrase. I feel like determinism is a common enough term, or at least easily googled, so it should be enough to just say that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
91e429e
to
28bc61a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
If we are emphasising that the seeded rng is being used for deterministic purposes, then we kinda shouldn't be using Given |
So this PR should be abandoned I assume? |
Up to you. Personally, I would just merge this as an easy docs change (since the comments in the PR are correct with intent), then follow-up with the more extensive changes. |
Merge it from my opinion then as well! |
examples/3d/spotlight.rs
Outdated
@@ -48,6 +48,8 @@ fn setup( | |||
)); | |||
|
|||
// cubes | |||
|
|||
// Make it deterministic for testing purposes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Make it deterministic for testing purposes. | |
// We're seeding the PRNG here to make this example deterministic for testing purposes. | |
// This isn't strictly required in practical use unless you need your app to be deterministic. |
This may need to be reflected on the other examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want this exact wording for all instances? I feel its a little bit verbose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is, but explaining the full reasoning is probably for the best.
Can this PR update from main, now that #12644 is merged? (There should be a button on Github, or you can run |
Merged main in, it should is up to date now! |
@alice-i-cecile I think the above comment about rewording it should be addressed before merging. This is otherwise a bit light on why it's being done. |
Objective
Solution