From 8c959946a8e6cacbc91a42b468af71b399cf014c Mon Sep 17 00:00:00 2001 From: dooglus Date: Tue, 4 Nov 2008 20:11:06 +0000 Subject: [PATCH] Revision 1150 stopped synfig-core/trunk/examples/star.sifz from rendering correctly. This fixes it. git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2149 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/valuenode_bline.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/synfig-core/trunk/src/synfig/valuenode_bline.cpp b/synfig-core/trunk/src/synfig/valuenode_bline.cpp index a5dc1de..dde8a45 100644 --- a/synfig-core/trunk/src/synfig/valuenode_bline.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_bline.cpp @@ -79,7 +79,12 @@ radial_interpolation(const Vector& a, const Vector& b, float c) affine_combo ang_combo; Real mag(mag_combo(a.mag(),b.mag(),c)); - Angle ang(ang_combo(Angle::tan(a[1],a[0]),Angle::tan(b[1],b[0]),c)); + Angle angle_a(Angle::tan(a[1],a[0])); + Angle angle_b(Angle::tan(b[1],b[0])); + float diff = Angle::deg(angle_b - angle_a).get(); + if (diff < -180) angle_b += Angle::deg(360); + else if (diff > 180) angle_a += Angle::deg(360); + Angle ang(ang_combo(angle_a, angle_b, c)); return Point( mag*Angle::cos(ang).get(),mag*Angle::sin(ang).get() ); } -- 2.7.4