Skip to content

Commit db3636d

Browse files
committed
Fix a function in listing28 and fix an OCR error in book2
Resolves #475
1 parent 9dc88c2 commit db3636d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

books/RayTracingTheNextWeek.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@
12141214
return p;
12151215
}
12161216

1217-
void permute(int* p, int n) {
1217+
static void permute(int* p, int n) {
12181218
for (int i = n-1; i > 0; i--) {
12191219
int target = random_int(0, i);
12201220
int tmp = p[i];
@@ -1256,7 +1256,7 @@
12561256
hittable_list two_perlin_spheres() {
12571257
hittable_list objects;
12581258

1259-
auto pertext = make_shared<noise_texture>(4);
1259+
auto pertext = make_shared<noise_texture>();
12601260
objects.add(make_shared<sphere>(point3(0,-1000,0), 1000, make_shared<lambertian>(pertext)));
12611261
objects.add(make_shared<sphere>(point3(0, 2, 0), 2, make_shared<lambertian>(pertext)));
12621262

@@ -1495,7 +1495,7 @@
14951495
c[di][dj][dk] = ranvec[
14961496
perm_x[(i+di) & 255] ^
14971497
perm_y[(j+dj) & 255] ^
1498-
pexm_z[(k+dk) & 255]
1498+
perm_z[(k+dk) & 255]
14991499
];
15001500

15011501
return perlin_interp(c, u, v, w);

0 commit comments

Comments
 (0)