Skip to content

Commit c1b9ca4

Browse files
LollipopFthollasch
authored andcommitted
fixes Book 1 Chapter 6.7 ray_color function
fixes #1059 and #1064
1 parent 806ab49 commit c1b9ca4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

books/RayTracingInOneWeekend.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@
784784
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
785785
vec3 unit_direction = unit_vector(r.direction());
786786
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
787-
a = 0.5*(unit_direction.y() + 1.0);
787+
auto a = 0.5*(unit_direction.y() + 1.0);
788788
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
789789
return (1.0-a)*color(1.0, 1.0, 1.0) + a*color(0.5, 0.7, 1.0);
790790
}
@@ -1241,9 +1241,7 @@
12411241

12421242
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
12431243
vec3 unit_direction = unit_vector(r.direction());
1244-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
12451244
auto a = 0.5*(unit_direction.y() + 1.0);
1246-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
12471245
return (1.0-a)*color(1.0, 1.0, 1.0) + a*color(0.5, 0.7, 1.0);
12481246
}
12491247

0 commit comments

Comments
 (0)