add blue gradient background
This commit is contained in:
parent
9083e0e7f1
commit
73cb93cf2d
3 changed files with 157 additions and 31 deletions
11
in_one_weekend/src/ray.zig
Normal file
11
in_one_weekend/src/ray.zig
Normal file
|
@ -0,0 +1,11 @@
|
|||
const Vec3 = @import("vec3.zig").Vec3;
|
||||
const Point3 = @import("vec3.zig").Point3;
|
||||
|
||||
pub const Ray = struct {
|
||||
origin: Point3,
|
||||
direction: Vec3,
|
||||
|
||||
pub fn at(t: f32) Point3 {
|
||||
return origin.add(direction.mul(t));
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue