From e93eee4bb96bd2d81e422dc9d453da6138fd6ba2 Mon Sep 17 00:00:00 2001 From: Martin Lehoux Date: Sun, 5 Apr 2020 22:46:01 -0700 Subject: misc - Doc --- ray.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ray.go') diff --git a/ray.go b/ray.go index c874e31..a3f78f8 100644 --- a/ray.go +++ b/ray.go @@ -1,9 +1,11 @@ package main +// Ray contains a ray data type Ray struct { origin, direction Vec3D } +// PointAt computes ray position at a time func (ray Ray) PointAt(time float64) Vec3D { return AddVec3D(ray.origin, ScalarProduct(time, ray.direction)) } -- cgit v1.3