Skip to content

Commit 8410152

Browse files
committed
book nextWeek: add missing include <algorithm>
1 parent c13abe4 commit 8410152

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

books/RayTracingTheNextWeek.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,9 @@
764764
This yields:
765765

766766
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
767+
#include <algorithm>
768+
...
769+
767770
bvh_node::bvh_node(std::vector<hittable*>& objects, int n, double time0, double time1) {
768771
int axis = random_int(0,2);
769772
auto comparator = (axis == 0) ? box_x_compare

src/TheNextWeek/bvh.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class bvh_node : public hittable {
2929
virtual bool hit(const ray& r, double t_min, double t_max, hit_record& rec) const;
3030
virtual bool bounding_box(double t0, double t1, aabb& output_box) const;
3131

32+
public:
3233
hittable *left;
3334
hittable *right;
3435
aabb box;

0 commit comments

Comments
 (0)