From cb4358397d34ad62ccb22a5f79e884c7ade3ddbf Mon Sep 17 00:00:00 2001 From: Steve Hollasch Date: Sat, 23 May 2020 18:06:23 -0700 Subject: [PATCH] Fix highlighting in listing 62 `camera::get_ray()` parameters renamed from `u,v` to `s,t`. Resolves #616 --- CHANGELOG.md | 2 +- books/RayTracingInOneWeekend.html | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25ab500f..8df97437 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/books/RayTracingInOneWeekend.html b/books/RayTracingInOneWeekend.html index 406bac9d..9344cd04 100644 --- a/books/RayTracingInOneWeekend.html +++ b/books/RayTracingInOneWeekend.html @@ -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; @@ -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();