Skip to content

Commit 0d5d098

Browse files
Trevor Blackhollasch
authored andcommitted
Resolves #194
1 parent 89635df commit 0d5d098

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

books/RayTracingTheRestOfYourLife.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,7 +944,7 @@
944944
float r2 = random_double();
945945
float x = cos(2*M_PI*r1)*2*sqrt(r2*(1-r2));
946946
float y = sin(2*M_PI*r1)*2*sqrt(r2*(1-r2));
947-
float z = 1 - r2;
947+
float z = 1 - 2*r2;
948948

949949
std::cout << x << " " << y << " " << z << "\n";
950950
}

0 commit comments

Comments
 (0)