Skip to content

Commit 6d92ff6

Browse files
authored
Merge branch 'dev-patch' into fix-issue-694
2 parents 6a71b9d + 58c4b50 commit 6d92ff6

File tree

4 files changed

+14
-9
lines changed

4 files changed

+14
-9
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Change Log -- Ray Tracing in One Weekend
1212

1313
### _The Next Week_
1414
- Delete: remove unused u,v,w variables in initial `perlin::noise()` function (#684)
15+
- Fix: Listing 15: In `bvh.h`, add missing `hittable_list.h` include (#690)
16+
- Fix: Listing 33, 34, 38: Change implicit casts to explicit ones (#692)
1517
- Fix: Listing 70: Add missing `bvh.h` (#694)
1618
- Fix: Listing 70 and `main.cc`: Change a fuzz value of a metal sphere to 1.0 which is the maximum value (#694)
1719

books/RayTracingTheNextWeek.html

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,7 @@
862862

863863
#include "rtweekend.h"
864864
#include "hittable.h"
865+
#include "hittable_list.h"
865866

866867

867868
class bvh_node : public hittable {
@@ -1591,9 +1592,9 @@
15911592
auto v = p.y() - floor(p.y());
15921593
auto w = p.z() - floor(p.z());
15931594

1594-
int i = floor(p.x());
1595-
int j = floor(p.y());
1596-
int k = floor(p.z());
1595+
auto i = static_cast<int>(floor(p.x()));
1596+
auto j = static_cast<int>(floor(p.y()));
1597+
auto k = static_cast<int>(floor(p.z()));
15971598
double c[2][2][2];
15981599

15991600
for (int di=0; di < 2; di++)
@@ -1645,9 +1646,9 @@
16451646
w = w*w*(3-2*w);
16461647
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
16471648

1648-
int i = floor(p.x());
1649-
int j = floor(p.y());
1650-
int k = floor(p.z());
1649+
auto i = static_cast<int>(floor(p.x()));
1650+
auto j = static_cast<int>(floor(p.y()));
1651+
auto k = static_cast<int>(floor(p.z()));
16511652
...
16521653
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16531654
[Listing [perlin-smoothed]: <kbd>[perlin.h]</kbd> Perlin smoothed]
@@ -1780,9 +1781,9 @@
17801781
auto v = p.y() - floor(p.y());
17811782
auto w = p.z() - floor(p.z());
17821783
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
1783-
int i = floor(p.x());
1784-
int j = floor(p.y());
1785-
int k = floor(p.z());
1784+
auto i = static_cast<int>(floor(p.x()));
1785+
auto j = static_cast<int>(floor(p.y()));
1786+
auto k = static_cast<int>(floor(p.z()));
17861787
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
17871788
vec3 c[2][2][2];
17881789
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++

books/acknowledgments.md.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
- Phil Cristensen
5454
- [Ronald Wotzlaw](https://github.com/ronaldfw)
5555
- [Shaun P. Lee](https://github.com/shaunplee)
56+
- [Shota Kawajiri](https://github.com/estshorter)
5657
- Tatsuya Ogawa
5758
- Thiago Ize
5859
- Vahan Sosoyan

src/TheNextWeek/bvh.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "rtweekend.h"
1515

1616
#include "hittable.h"
17+
#include "hittable_list.h"
1718

1819
#include <algorithm>
1920

0 commit comments

Comments
 (0)