Skip to content

Commit

Permalink
fixed the ray_sphere_intersection_test() to work with the new interse…
Browse files Browse the repository at this point in the history
…ction function return values

git-svn-id: http://svn.plouj.com/repos/eraytracer@60 b8c14938-b733-429d-887c-d66ed1f8cd15
  • Loading branch information
plouj committed Feb 15, 2008
1 parent 531a706 commit d7263bc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions raytracer.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1037,9 +1037,10 @@ ray_sphere_intersection_test() ->
Ray3 = #ray{
origin=#vector{x=4, y=0, z=0},
direction=#vector{x=0, y=0, z=1}},
Subtest1 = ray_sphere_intersect(Ray1, Sphere) == 7.0,
Subtest2 = ray_sphere_intersect(Ray2, Sphere) == infinity,
Subtest3 = ray_sphere_intersect(Ray3, Sphere) == infinity,
{Distance1, _Hit_location1, _Hit_normal1} = ray_sphere_intersect(Ray1, Sphere),
Subtest1 = Distance1 == 7.0,
Subtest2 = ray_sphere_intersect(Ray2, Sphere) == none,
Subtest3 = ray_sphere_intersect(Ray3, Sphere) == none,
Subtest1 and Subtest2 and Subtest3.

point_on_screen_test() ->
Expand Down

0 comments on commit d7263bc

Please sign in to comment.