From 11cc6d1ee1e1229f510b7598fec20af683520511 Mon Sep 17 00:00:00 2001 From: Franz Roters Date: Thu, 26 Apr 2007 11:46:58 +0000 Subject: [PATCH] math_sampleGaussOri did not treat the special case of zero noise (scatter) --- trunk/math.f90 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/trunk/math.f90 b/trunk/math.f90 index 42ca674e2..bb9442050 100644 --- a/trunk/math.f90 +++ b/trunk/math.f90 @@ -725,6 +725,11 @@ real(pReal), dimension(5) :: rnd real(pReal) noise,scatter,cosScatter integer(pInt) i + +if (noise<=0.01) then + math_sampleGaussOri = center + return +endif ! Helming uses different distribution with Bessel functions ! therefore the gauss scatter width has to be scaled differently