File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ 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
-
15
+ - Fix: Listing 33, 34, 38: Change implicit casts to explicit ones ( # 692 )
16
16
17
17
----------------------------------------------------------------------------------------------------
18
18
# v3.2.0 (2020-07-18)
Original file line number Diff line number Diff line change 1591
1591
auto v = p.y() - floor(p.y());
1592
1592
auto w = p.z() - floor(p.z());
1593
1593
1594
- int i = floor(p.x());
1595
- int j = floor(p.y());
1596
- int k = floor(p.z());
1594
+ auto i = static_cast < int > ( floor(p.x() ));
1595
+ auto j = static_cast < int > ( floor(p.y() ));
1596
+ auto k = static_cast < int > ( floor(p.z() ));
1597
1597
double c[2][2][2];
1598
1598
1599
1599
for (int di=0; di < 2; di++)
1645
1645
w = w*w*(3-2*w);
1646
1646
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
1647
1647
1648
- int i = floor(p.x());
1649
- int j = floor(p.y());
1650
- int k = floor(p.z());
1648
+ auto i = static_cast < int > ( floor(p.x() ));
1649
+ auto j = static_cast < int > ( floor(p.y() ));
1650
+ auto k = static_cast < int > ( floor(p.z() ));
1651
1651
...
1652
1652
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1653
1653
[Listing [perlin-smoothed]: < kbd> [perlin.h]</ kbd> Perlin smoothed]
1780
1780
auto v = p.y() - floor(p.y());
1781
1781
auto w = p.z() - floor(p.z());
1782
1782
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
1783
- int i = floor(p.x());
1784
- int j = floor(p.y());
1785
- int k = floor(p.z());
1783
+ auto i = static_cast < int > ( floor(p.x() ));
1784
+ auto j = static_cast < int > ( floor(p.y() ));
1785
+ auto k = static_cast < int > ( floor(p.z() ));
1786
1786
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
1787
1787
vec3 c[2][2][2];
1788
1788
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
You can’t perform that action at this time.
0 commit comments