src/scene.cc
branchpyrit
changeset 24 d0d76e8a5203
parent 22 76b7bd51d64a
child 25 b8232edee786
--- a/src/scene.cc	Tue Dec 04 08:58:05 2007 +0100
+++ b/src/scene.cc	Wed Dec 05 18:54:23 2007 +0100
@@ -246,7 +246,7 @@
 	const Float lnd = 1.0f / (D[k] + nu * D[ku] + nv * D[kv]);
 	const Float t = (nd - O[k] - nu * O[ku] - nv * O[kv]) * lnd;
 
-	if (!(t < dist && t > 0))
+	if (t < 0 || t >= dist)
 		return false;
 
 	Float hu = O[ku] + t * D[ku] - A[ku];