From 46273d22880cd82584e91cc328a6d8dd88a96f7d Mon Sep 17 00:00:00 2001
From: Walter Van Herck <w.van.herck@fz-juelich.de>
Date: Thu, 7 Jul 2016 11:27:17 +0200
Subject: [PATCH] Added comment

---
 Core/Algorithms/SpecularMatrix.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Core/Algorithms/SpecularMatrix.cpp b/Core/Algorithms/SpecularMatrix.cpp
index cd93e873fb8..742de9ef1a9 100644
--- a/Core/Algorithms/SpecularMatrix.cpp
+++ b/Core/Algorithms/SpecularMatrix.cpp
@@ -129,6 +129,7 @@ bool calculateUpFromLayer(SpecularMatrix::MultiLayerCoeff_t& coeff, const MultiL
                     (lambda_rough-lambda_below)*coeff[i+1].t_r(0) +
                     (lambda_rough+lambda_below)*coeff[i+1].t_r(1) )/2.0/lambda *
                     std::exp( ikd*lambda);
+        // If T overflowed, return false, so the calculation can restart from a layer higher
         if (std::isinf(std::abs(coeff[i].getScalarT()))) {
             return false;
         }
-- 
GitLab