Skip to content

Fix refs to random_in_hemisphere #1207

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

Merged
merged 1 commit into from
Aug 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion books/RayTracingInOneWeekend.html
Original file line number Diff line number Diff line change
Expand Up @@ -2289,7 +2289,7 @@
return -on_unit_sphere;
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Listing [random-in-hemisphere]: <kbd>[vec3.h]</kbd> The random_in_hemisphere() function]
[Listing [random-in-hemisphere]: <kbd>[vec3.h]</kbd> The random_on_hemisphere() function]

</div>

Expand Down
2 changes: 1 addition & 1 deletion books/RayTracingTheRestOfYourLife.html
Original file line number Diff line number Diff line change
Expand Up @@ -1819,7 +1819,7 @@
bool scatter(const ray& r_in, const hit_record& rec, color& attenuation, ray& scattered)
const override {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
auto scatter_direction = random_in_hemisphere(rec.normal);
auto scatter_direction = random_on_hemisphere(rec.normal);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that on is really what we want. If we really do want on, then we'll need to implement it. Also note that this code is quickly replaced later in the text.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++

// Catch degenerate scatter direction
Expand Down