From 07c70b2bc765f57145653abef09d522db236dacf Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Mon, 9 Sep 2013 09:03:07 -0700 Subject: [PATCH] Initialize ray before testing intersection --- test/test_object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_object.c b/test/test_object.c index 56a90fd..7aa655a 100644 --- a/test/test_object.c +++ b/test/test_object.c @@ -36,6 +36,7 @@ START_TEST(test_sphere_does_intersect) loc = vector_init(0, -5, 0); dir = vector_init(0, 1, 0); + ray = ray_init(loc, dir); tvectors[0] = vector_init(0, -1, 0); tvectors[1] = vector_init(0, 1, 0); check_sphere_intersection(sphere, ray, tvectors, 2);