|
@@ -356,12 +356,9 @@ class Ray {
|
|
|
|
|
|
if ( ( tmin > tymax ) || ( tymin > tmax ) ) return null;
|
|
|
|
|
|
- // These lines also handle the case where tmin or tmax is NaN
|
|
|
- // (result of 0 * Infinity). x !== x returns true if x is NaN
|
|
|
+ if ( tymin > tmin || isNaN( tmin ) ) tmin = tymin;
|
|
|
|
|
|
- if ( tymin > tmin || tmin !== tmin ) tmin = tymin;
|
|
|
-
|
|
|
- if ( tymax < tmax || tmax !== tmax ) tmax = tymax;
|
|
|
+ if ( tymax < tmax || isNaN( tmax ) ) tmax = tymax;
|
|
|
|
|
|
if ( invdirz >= 0 ) {
|
|
|
|