From a9983fb8d3d1ecf955c6fe4339bb36fd22153abb Mon Sep 17 00:00:00 2001 From: Martin Lehoux Date: Sat, 4 Apr 2020 14:49:42 -0700 Subject: feat - Basic Ray features --- ray.go | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 ray.go diff --git a/ray.go b/ray.go new file mode 100644 index 0000000..c874e31 --- /dev/null +++ b/ray.go @@ -0,0 +1,9 @@ +package main + +type Ray struct { + origin, direction Vec3D +} + +func (ray Ray) PointAt(time float64) Vec3D { + return AddVec3D(ray.origin, ScalarProduct(time, ray.direction)) +} -- cgit v1.3