From: dooglus Date: Mon, 23 Apr 2007 09:34:16 +0000 (+0000) Subject: Fix 1672033: when deciding which curve we are closest to, ignore the very ends of... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=f54364d89e1687ee58effaa0e5932d68c1137eed;p=synfig.git Fix 1672033: when deciding which curve we are closest to, ignore the very ends of each curve. This allows us to better decide between 2 curves which end in exactly the same place. git-svn-id: http://svn.voria.com/code@481 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/ETL/trunk/ETL/_bezier.h b/ETL/trunk/ETL/_bezier.h index 7e26796..0e3ace9 100644 --- a/ETL/trunk/ETL/_bezier.h +++ b/ETL/trunk/ETL/_bezier.h @@ -551,7 +551,8 @@ public: bezier::operator[](1), bezier::operator[](2), bezier::operator[](3)}; - return NearestPointOnCurve(x, array); + float t = NearestPointOnCurve(x, array); + return t > 0.999999 ? 0.999999 : t < 0.000001 ? 0.000001 : t; } else {