From 64a771aa19423d96bb72251eb209d50eb1f13f08 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Tue, 11 Oct 2022 10:04:10 +0200 Subject: Stop zero weights. --- rbmp.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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::min(), w * z + x * y); e1.weights.push(z / cellFactor); e2.weights.push(y / cellFactor); -- cgit v1.2.3-54-g00ecf