Skip to content
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.

Commit

Permalink
added a bool and removed a few semicolons. Removing bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
trevordblack committed Aug 24, 2019
1 parent 54be5f5 commit 6dbc6c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/constant_medium.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class constant_medium : public hitable {
bool constant_medium::hit(const ray& r, float t_min, float t_max, hit_record& rec) const {

// Print occasional samples when debugging. To enable, set enableDebug true.
const enableDebug = false;
const bool enableDebug = false;
bool debugging = enableDebug && drand48() < 0.00001;

hit_record rec1, rec2;
Expand All @@ -60,8 +60,8 @@ bool constant_medium::hit(const ray& r, float t_min, float t_max, hit_record& re
rec.p = r.point_at_parameter(rec.t);

if (debugging) {
std::cerr << "hit_distance = " << hit_distance << '\n';
<< "rec.t = " << rec.t << '\n';
std::cerr << "hit_distance = " << hit_distance << '\n'
<< "rec.t = " << rec.t << '\n'
<< "rec.p = " << rec.p << '\n';
}

Expand Down

0 comments on commit 6dbc6c0

Please sign in to comment.