Skip to content

Commit

Permalink
Fix refs to random_in_hemisphere
Browse files Browse the repository at this point in the history
These should be random_on_hemisphere.

Resolves #1198
  • Loading branch information
hollasch committed Aug 12, 2023
1 parent 87cd5b5 commit 7f621e0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++

// Catch degenerate scatter direction
Expand Down

0 comments on commit 7f621e0

Please sign in to comment.