From f54364d89e1687ee58effaa0e5932d68c1137eed Mon Sep 17 00:00:00 2001 From: dooglus Date: Mon, 23 Apr 2007 09:34:16 +0000 Subject: [PATCH 1/1] 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 --- ETL/trunk/ETL/_bezier.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 { -- 2.7.4