summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/photon.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/photon.h b/src/photon.h
index 6cf3367..fb29ffe 100644
--- a/src/photon.h
+++ b/src/photon.h
@@ -52,7 +52,7 @@ enum {BREAK, CONTINUE, PASS}; // return value from propagate_to_boundary
__device__ float get_theta(const float3 &a, const float3 &b)
{
- return acosf(fmaxf(0.0f,fminf(1.0f,dot(a,b))));
+ return acosf(fmaxf(-1.0f,fminf(1.0f,dot(a,b))));
}
__device__ void fill_state(State &s, Photon &p)