Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion books/RayTracingTheNextWeek.html
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@
left = objects[start];
right = objects[start+1];
} else {
std::sort(objects.begin() + start, objects.begin() + end, comparator);
std::sort(std::begin(objects) + start, std::begin(objects) + end, comparator);

auto mid = start + object_span/2;
left = make_shared<bvh_node>(objects, start, mid);
Expand Down
2 changes: 1 addition & 1 deletion books/RayTracingTheRestOfYourLife.html
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@
}

// Sort the samples by x.
std::sort(samples, samples + N, compare_by_x);
std::sort(std::begin(samples), std::end(samples), compare_by_x);

// Find out the sample at which we have half of our area.
double half_sum = sum / 2.0;
Expand Down
2 changes: 1 addition & 1 deletion src/TheNextWeek/bvh.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class bvh_node : public hittable {
left = objects[start];
right = objects[start+1];
} else {
std::sort(objects.begin() + start, objects.begin() + end, comparator);
std::sort(std::begin(objects) + start, std::begin(objects) + end, comparator);

auto mid = start + object_span/2;
left = make_shared<bvh_node>(objects, start, mid);
Expand Down
2 changes: 1 addition & 1 deletion src/TheRestOfYourLife/bvh.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class bvh_node : public hittable {
left = objects[start];
right = objects[start+1];
} else {
std::sort(objects.begin() + start, objects.begin() + end, comparator);
std::sort(std::begin(objects) + start, std::begin(objects) + end, comparator);

auto mid = start + object_span/2;
left = make_shared<bvh_node>(objects, start, mid);
Expand Down
2 changes: 1 addition & 1 deletion src/TheRestOfYourLife/estimate_halfway.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ int main() {
}

// Sort the samples by x.
std::sort(samples, samples + N, compare_by_x);
std::sort(std::begin(samples), std::end(samples), compare_by_x);

// Find out the sample at which we have half of our area.
double half_sum = sum / 2.0;
Expand Down