From 6ebce7e9480c87c5d574f1d48242c8272b873964 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Thu, 21 Jul 2016 14:13:20 -0400 Subject: 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 --- source/blender/freestyle/intern/stroke/Curve.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/freestyle/intern/stroke/Curve.cpp') 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; -- cgit v1.2.3