add blue gradient background

This commit is contained in:
Fabien Freling 2020-09-05 17:25:27 +02:00
parent 9083e0e7f1
commit 73cb93cf2d
3 changed files with 157 additions and 31 deletions

View 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));
}
};