aboutsummaryrefslogtreecommitdiff
path: root/ray.go
diff options
context:
space:
mode:
Diffstat (limited to 'ray.go')
-rw-r--r--ray.go2
1 files changed, 2 insertions, 0 deletions
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))
}