diff --git a/rtiow/src/ray.rs b/rtiow/src/ray.rs index 4fc60d1..f250646 100644 --- a/rtiow/src/ray.rs +++ b/rtiow/src/ray.rs @@ -10,7 +10,12 @@ pub struct Ray { } impl Ray { - pub fn new(origin: Vec3, direction: Vec3, time: f32) -> Ray { + pub fn new(origin: V, direction: V, time: f32) -> Ray + where + V: Into, + { + let direction = direction.into(); + let origin = origin.into(); let inv = 1. / direction; Ray { origin,