aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/rtw/perlin.zig
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-04-20 19:32:59 +0900
committernsfisis <nsfisis@gmail.com>2025-04-20 19:33:04 +0900
commitda9a510c32c9a1d6fc2e82e23d0b6b1f1a6a7f83 (patch)
tree5046292a6b479465ce58c73e4484861a6972bfb1 /src/rtw/perlin.zig
parentc64077509a2a5e7af8816653e4ea22c4bbeeaff2 (diff)
downloadRayTracingInOneWeekend.zig-da9a510c32c9a1d6fc2e82e23d0b6b1f1a6a7f83.tar.gz
RayTracingInOneWeekend.zig-da9a510c32c9a1d6fc2e82e23d0b6b1f1a6a7f83.tar.zst
RayTracingInOneWeekend.zig-da9a510c32c9a1d6fc2e82e23d0b6b1f1a6a7f83.zip
refactor: prefer using qualified name
Diffstat (limited to 'src/rtw/perlin.zig')
-rw-r--r--src/rtw/perlin.zig17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/rtw/perlin.zig b/src/rtw/perlin.zig
index 77a075d..cb23e11 100644
--- a/src/rtw/perlin.zig
+++ b/src/rtw/perlin.zig
@@ -1,5 +1,4 @@
const std = @import("std");
-const ArrayList = std.ArrayList;
const rand = @import("rand.zig");
const Random = rand.Random;
@@ -11,17 +10,17 @@ const Vec3 = @import("vec.zig").Vec3;
pub const Perlin = struct {
const POINT_COUNT = 256;
- randomVec: ArrayList(Vec3),
- permX: ArrayList(usize),
- permY: ArrayList(usize),
- permZ: ArrayList(usize),
+ randomVec: std.ArrayList(Vec3),
+ permX: std.ArrayList(usize),
+ permY: std.ArrayList(usize),
+ permZ: std.ArrayList(usize),
pub fn init(allocator: std.mem.Allocator, rng: Random) !Perlin {
var perlin = Perlin{
- .randomVec = try ArrayList(Vec3).initCapacity(allocator, POINT_COUNT),
- .permX = try ArrayList(usize).initCapacity(allocator, POINT_COUNT),
- .permY = try ArrayList(usize).initCapacity(allocator, POINT_COUNT),
- .permZ = try ArrayList(usize).initCapacity(allocator, POINT_COUNT),
+ .randomVec = try std.ArrayList(Vec3).initCapacity(allocator, POINT_COUNT),
+ .permX = try std.ArrayList(usize).initCapacity(allocator, POINT_COUNT),
+ .permY = try std.ArrayList(usize).initCapacity(allocator, POINT_COUNT),
+ .permZ = try std.ArrayList(usize).initCapacity(allocator, POINT_COUNT),
};
var i: usize = 0;