File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ Change Log -- Ray Tracing in One Weekend
12
12
13
13
### _ The Next Week_
14
14
- Delete: remove unused u,v,w variables in initial ` perlin::noise() ` function (#684 )
15
- - Fix: Listing 15 and ` bvh.h ` : Add missing ` hittable_list.h ` include (#690 )
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 )
16
17
17
18
18
19
----------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 1592
1592
auto v = p.y() - floor(p.y());
1593
1593
auto w = p.z() - floor(p.z());
1594
1594
1595
- int i = floor(p.x());
1596
- int j = floor(p.y());
1597
- 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() ));
1598
1598
double c[2][2][2];
1599
1599
1600
1600
for (int di=0; di < 2; di++)
1646
1646
w = w*w*(3-2*w);
1647
1647
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
1648
1648
1649
- int i = floor(p.x());
1650
- int j = floor(p.y());
1651
- 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() ));
1652
1652
...
1653
1653
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1654
1654
[Listing [perlin-smoothed]: < kbd> [perlin.h]</ kbd> Perlin smoothed]
1781
1781
auto v = p.y() - floor(p.y());
1782
1782
auto w = p.z() - floor(p.z());
1783
1783
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
1784
- int i = floor(p.x());
1785
- int j = floor(p.y());
1786
- 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() ));
1787
1787
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
1788
1788
vec3 c[2][2][2];
1789
1789
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
You can’t perform that action at this time.
0 commit comments