aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/rtw
diff options
context:
space:
mode:
Diffstat (limited to 'src/rtw')
-rw-r--r--src/rtw/hittable.zig8
-rw-r--r--src/rtw/rand.zig2
2 files changed, 5 insertions, 5 deletions
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 {