|
@@ -234,8 +234,8 @@ class Ray {
|
|
|
// t1 = second intersect point - exit point on back of sphere
|
|
|
const t1 = tca + thc;
|
|
|
|
|
|
- // test to see if both t0 and t1 are behind the ray - if so, return null
|
|
|
- if ( t0 < 0 && t1 < 0 ) return null;
|
|
|
+ // test to see if t1 is behind the ray - if so, return null
|
|
|
+ if ( t1 < 0 ) return null;
|
|
|
|
|
|
// test to see if t0 is behind the ray:
|
|
|
// if it is, the ray is inside the sphere, so return the second exit point scaled by t1,
|