This is an automated email from the ASF dual-hosted git repository.

aherbert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-rng.git

commit 7e491beaa99291aa5ce1148b86debcfa08c7ae74
Author: aherbert <aherb...@apache.org>
AuthorDate: Thu Jul 29 13:58:28 2021 +0100

    Remove unnecessary parentheses
---
 .../distribution/MarsagliaNormalizedGaussianSampler.java | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/MarsagliaNormalizedGaussianSampler.java
 
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/MarsagliaNormalizedGaussianSampler.java
index dd0b370..bfd96d0 100644
--- 
a/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/MarsagliaNormalizedGaussianSampler.java
+++ 
b/commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/distribution/MarsagliaNormalizedGaussianSampler.java
@@ -67,16 +67,16 @@ public class MarsagliaNormalizedGaussianSampler
 
                 // Pair is not within the unit circle: Generate another one.
             }
-        } else {
-            // Use the second element of the pair (generated at the
-            // previous invocation).
-            final double r = nextGaussian;
+        }
 
-            // Both elements of the pair have been used.
-            nextGaussian = Double.NaN;
+        // Use the second element of the pair (generated at the
+        // previous invocation).
+        final double r = nextGaussian;
 
-            return r;
-        }
+        // Both elements of the pair have been used.
+        nextGaussian = Double.NaN;
+
+        return r;
     }
 
     /** {@inheritDoc} */

Reply via email to