summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rbmp.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/rbmp.hpp b/rbmp.hpp
index 4cd6605..88f5900 100644
--- a/rbmp.hpp
+++ b/rbmp.hpp
@@ -80,7 +80,7 @@ public:
Real y = e3.weights.top();
Real z = e4.weights.top();
- Real cellFactor = w * z + x * y;
+ Real cellFactor = std::max(std::numeric_limits<Real>::min(), w * z + x * y);
e1.weights.push(z / cellFactor);
e2.weights.push(y / cellFactor);