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
1212
1313### _ The Next Week_
1414 - 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 )
1617
1718
1819----------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 15921592 auto v = p.y() - floor(p.y());
15931593 auto w = p.z() - floor(p.z());
15941594
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() ));
15981598 double c[2][2][2];
15991599
16001600 for (int di=0; di < 2; di++)
16461646 w = w*w*(3-2*w);
16471647 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
16481648
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() ));
16521652 ...
16531653 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16541654 [Listing [perlin-smoothed]: < kbd> [perlin.h]</ kbd> Perlin smoothed]
17811781 auto v = p.y() - floor(p.y());
17821782 auto w = p.z() - floor(p.z());
17831783 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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() ));
17871787 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
17881788 vec3 c[2][2][2];
17891789 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
You can’t perform that action at this time.
0 commit comments