Skip to content

Commit 5222ccc

Browse files
committed
Avoid default params for ray constructor
1 parent f4ebec4 commit 5222ccc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

books/RayTracingTheNextWeek.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@
7171

7272

7373
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
74-
ray(const point3& origin, const vec3& direction, double time = 0.0)
74+
ray(const point3& origin, const vec3& direction) : orig(origin), dir(direction), tm(0) {}
75+
76+
ray(const point3& origin, const vec3& direction, double time)
7577
: orig(origin), dir(direction), tm(time)
7678
{}
7779
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++

0 commit comments

Comments
 (0)