Skip to content

Commit

Permalink
Merge pull request #506 from RayTracing/incl-math
Browse files Browse the repository at this point in the history
Include cmath in vec3.h
  • Loading branch information
hollasch committed May 3, 2020
2 parents b363815 + db72c63 commit b06194f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions books/RayTracingInOneWeekend.html
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,11 @@
#ifndef VEC3_H
#define VEC3_H

#include <cmath>
#include <iostream>

using std::sqrt;

class vec3 {
public:
vec3() : e{0,0,0} {}
Expand Down Expand Up @@ -1134,6 +1137,7 @@

using std::shared_ptr;
using std::make_shared;
using std::sqrt;

// Constants

Expand Down
1 change: 1 addition & 0 deletions src/common/rtweekend.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

using std::shared_ptr;
using std::make_shared;
using std::sqrt;

// Constants

Expand Down
2 changes: 2 additions & 0 deletions src/common/vec3.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
// along with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
//==============================================================================================

#include <cmath>
#include <iostream>

using std::sqrt;

class vec3 {
public:
Expand Down

0 comments on commit b06194f

Please sign in to comment.