summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vec.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/vec.h b/vec.h
index 11b9bd3..c109f7c 100644
--- a/vec.h
+++ b/vec.h
@@ -131,8 +131,8 @@ struct vec3 {
// If TIR happens, the ray will be reflected.
template<bool Enable_TIR>
vec3 refract(const vec3 &r1, double ri_inv) const {
- assert(fabs(mod2() - 1.0) < 1e-12);
- assert(fabs(r1.mod2() - 1.0) < 1e-12);
+ assert(fabs(mod2() - 1.0) < 1e-7);
+ assert(fabs(r1.mod2() - 1.0) < 1e-7);
assert(ri_inv > 0);
assert(dot(r1) < 0); // normal vector must be on the same side
const auto &n = *this; // normal vector