this repo has no description
1const std = @import("std");
2
3const zm = @import("zmath");
4
5const Ray = @This();
6
7orig: zm.Vec,
8dir: zm.Vec,
9
10pub fn init(origin: zm.Vec, direction: zm.Vec) Ray {
11 return Ray{
12 .orig = origin,
13 .dir = direction,
14 };
15}
16
17pub fn at(self: *Ray, t: f32) zm.Vec {
18 return self.orig + zm.f32x4s(t) * self.dir;
19}