diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-31 16:21:16 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-31 16:22:52 +0300 |
commit | aba4e6810f8b4d0e459137b64e061a2cadc457d1 (patch) | |
tree | 2b6159c7ba0f23c020600b71276772fa4a882b5b /source/blender/physics/intern/ConstrainedConjugateGradient.h | |
parent | 72a563cdee8fef198a200ff65b57ddb847c01795 (diff) |
Cleanup: style, use braces in source/ (include disabled blocks)
Diffstat (limited to 'source/blender/physics/intern/ConstrainedConjugateGradient.h')
-rw-r--r-- | source/blender/physics/intern/ConstrainedConjugateGradient.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/physics/intern/ConstrainedConjugateGradient.h b/source/blender/physics/intern/ConstrainedConjugateGradient.h index 4a0a6ab298c..56151b714a6 100644 --- a/source/blender/physics/intern/ConstrainedConjugateGradient.h +++ b/source/blender/physics/intern/ConstrainedConjugateGradient.h @@ -94,8 +94,9 @@ EIGEN_DONT_INLINE void constrained_conjugate_gradient(const MatrixType &mat, residual -= alpha * tmp; // update residue residualNorm2 = residual.squaredNorm(); - if (residualNorm2 < threshold) + if (residualNorm2 < threshold) { break; + } z = precond.solve(residual); // approximately solve for "A z = residual" |