Skip to content

Commit 79e044e

Browse files
committed
Refer to 'pow' in std:: namespace
1 parent 5ff6e7a commit 79e044e

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

books/RayTracingInOneWeekend.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3613,7 +3613,7 @@
36133613
// Use Schlick's approximation for reflectance.
36143614
auto r0 = (1 - refraction_index) / (1 + refraction_index);
36153615
r0 = r0*r0;
3616-
return r0 + (1-r0)*pow((1 - cosine),5);
3616+
return r0 + (1-r0)*std::pow((1 - cosine),5);
36173617
}
36183618
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
36193619
};

books/RayTracingTheRestOfYourLife.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,7 @@
655655
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
656656
for (int i = 0; i < N; i++) {
657657
auto x = random_double(a, b);
658-
sum += pow(std::sin(x), 5.0);
658+
sum += std::pow(std::sin(x), 5.0);
659659
}
660660
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
661661
[Listing [integ-sin5]: Integrating $\sin^5$]
@@ -1302,7 +1302,7 @@
13021302
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
13031303
double f(double d) {
13041304
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
1305-
return 8.0 * pow(d, 1.0/3.0);
1305+
return 8.0 * std::pow(d, 1.0/3.0);
13061306
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
13071307
}
13081308

src/InOneWeekend/material.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class dielectric : public material {
103103
// Use Schlick's approximation for reflectance.
104104
auto r0 = (1 - refraction_index) / (1 + refraction_index);
105105
r0 = r0*r0;
106-
return r0 + (1-r0)*pow((1 - cosine),5);
106+
return r0 + (1-r0)*std::pow((1 - cosine),5);
107107
}
108108
};
109109

src/TheNextWeek/material.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class dielectric : public material {
110110
// Use Schlick's approximation for reflectance.
111111
auto r0 = (1 - refraction_index) / (1 + refraction_index);
112112
r0 = r0*r0;
113-
return r0 + (1-r0)*pow((1 - cosine),5);
113+
return r0 + (1-r0)*std::pow((1 - cosine),5);
114114
}
115115
};
116116

src/TheRestOfYourLife/integrate_x_sq.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <stdlib.h>
1818

1919
double f(double d) {
20-
return 8.0 * pow(d, 1.0/3.0);
20+
return 8.0 * std::pow(d, 1.0/3.0);
2121
}
2222

2323
double pdf(double x) {

src/TheRestOfYourLife/material.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ class dielectric : public material {
129129
// Use Schlick's approximation for reflectance.
130130
auto r0 = (1 - refraction_index) / (1 + refraction_index);
131131
r0 = r0*r0;
132-
return r0 + (1-r0)*pow((1 - cosine),5);
132+
return r0 + (1-r0)*std::pow((1 - cosine),5);
133133
}
134134
};
135135

0 commit comments

Comments
 (0)