From c64077509a2a5e7af8816653e4ea22c4bbeeaff2 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 20 Apr 2025 19:22:50 +0900 Subject: feat: update zig to 0.14.0 --- src/rtw/hittable.zig | 8 ++++---- src/rtw/rand.zig | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'src/rtw') diff --git a/src/rtw/hittable.zig b/src/rtw/hittable.zig index c47d9ff..3816b4a 100644 --- a/src/rtw/hittable.zig +++ b/src/rtw/hittable.zig @@ -54,11 +54,11 @@ pub const Hittable = union(HittableTag) { return .{ .box = try Box.init(p0, p1, material, allocator) }; } - pub fn translate(obj: Rc(Self), offset: Vec3) Self { + pub fn makeTranslate(obj: Rc(Self), offset: Vec3) Self { return .{ .translate = .{ .object = obj, .offset = offset } }; } - pub fn rotateY(obj: Rc(Self), angle: f64) Self { + pub fn makeRotateY(obj: Rc(Self), angle: f64) Self { return .{ .rotateY = RotateY.init(obj, angle) }; } @@ -225,11 +225,11 @@ const MovingSphere = struct { const o0 = sphere.center(time0); const o1 = sphere.center(time1); const r = sphere.radius; - const box0 = .{ + const box0: Aabb = .{ .min = o0.sub(.{ .x = r, .y = r, .z = r }), .max = o0.add(.{ .x = r, .y = r, .z = r }), }; - const box1 = .{ + const box1: Aabb = .{ .min = o1.sub(.{ .x = r, .y = r, .z = r }), .max = o1.add(.{ .x = r, .y = r, .z = r }), }; diff --git a/src/rtw/rand.zig b/src/rtw/rand.zig index 47a8d61..dcc2aa1 100644 --- a/src/rtw/rand.zig +++ b/src/rtw/rand.zig @@ -2,7 +2,7 @@ const std = @import("std"); const Vec3 = @import("vec.zig").Vec3; -pub const Random = std.rand.Random; +pub const Random = std.Random; // [min, max) pub fn randomInt(comptime T: type, rand: Random, min: T, max: T) T { -- cgit v1.2.3-70-g09d2