this repo has no description
at 232ee55093cceaa6d53d8fd08f9ee489f6bcec79 19 lines 327 B view raw
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}