diff options
author | Mike Erwin <significant.bit@gmail.com> | 2016-07-21 21:13:20 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2016-07-21 22:53:39 +0300 |
commit | 6ebce7e9480c87c5d574f1d48242c8272b873964 (patch) | |
tree | 6f7de2e16d49f60c9dc9d66f174081e654026d51 /source | |
parent | b5ba14ef7097c18080834aff03a70c5398745579 (diff) |
fix typo in condition
(A - A).norm() is always 0 so condition is always true.
(A - B).norm() and (B - A).norm() both compute the same distance so I
picked one to match surrounding code.
Found with PVS-Studio T48917
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/freestyle/intern/stroke/Curve.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/freestyle/intern/stroke/Curve.cpp b/source/blender/freestyle/intern/stroke/Curve.cpp index 69c5dcdfe28..a8dbce84971 100644 --- a/source/blender/freestyle/intern/stroke/Curve.cpp +++ b/source/blender/freestyle/intern/stroke/Curve.cpp @@ -133,7 +133,7 @@ iA_B_eq_iB_A: //_t2d = t3; _t2d = t2 * t3; } - else if ((iA->getPoint2D() - iA->getPoint2D()).norm() < 1.0e-6) { + else if ((iA->getPoint2D() - iB->getPoint2D()).norm() < 1.0e-6) { __A = iB->A(); __B = iB->B(); //_t2d = t3; |