Skip to content

Commit 7df1eae

Browse files
committed
Clarify intended type of double value
Resolves #1249
1 parent 0f83efd commit 7df1eae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

books/RayTracingInOneWeekend.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
for (int i = 0; i < image_width; i++) {
121121
auto r = double(i) / (image_width-1);
122122
auto g = double(j) / (image_height-1);
123-
auto b = 0;
123+
auto b = 0.0;
124124

125125
int ir = int(255.999 * r);
126126
int ig = int(255.999 * g);
@@ -259,7 +259,7 @@
259259
for (int i = 0; i < image_width; i++) {
260260
auto r = double(i) / (image_width-1);
261261
auto g = double(j) / (image_height-1);
262-
auto b = 0;
262+
auto b = 0.0;
263263

264264
int ir = int(255.999 * r);
265265
int ig = int(255.999 * g);

0 commit comments

Comments
 (0)