Skip to content

Commit

Permalink
Fix highlighting in listing 62
Browse files Browse the repository at this point in the history
`camera::get_ray()` parameters renamed from `u,v` to `s,t`.

Resolves #616
  • Loading branch information
hollasch committed May 24, 2020
1 parent 94360de commit cb43583
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ Change Log -- Ray Tracing in One Weekend
- Fix: Listing 42: Don't need to include `ray.h` when using `rtweekend.h`
- Fix: Listing 48: Add missing `material.h` include
- Fix: Listing 61: Include updated `cam` declaration, show context w/highlighting
- Fix: Listing 62: Highlight rename of `camera::get_ray()` parameters to s, t (#616)
- Fix: Listing 63: Show reverted scene declarations
- Fix: Listing 68: Show final scene render parameters with highlighting
- New: Listing 50: Show the updated material definitions

### _The Next Week

- Fix: Listing 7: Show reverted viewing parameters from book 1 final scene


Expand Down
5 changes: 4 additions & 1 deletion books/RayTracingInOneWeekend.html
Original file line number Diff line number Diff line change
Expand Up @@ -2733,9 +2733,12 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
}


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
ray get_ray(double s, double t) const {
return ray(origin, lower_left_corner + s*horizontal + t*vertical - origin);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++

private:
point3 origin;
Expand Down Expand Up @@ -2890,8 +2893,8 @@
}


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
ray get_ray(double s, double t) const {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
vec3 rd = lens_radius * random_in_unit_disk();
vec3 offset = u * rd.x() + v * rd.y();

Expand Down

0 comments on commit cb43583

Please sign in to comment.