Revision: 2163
          http://synfig.svn.sourceforge.net/synfig/?rev=2163&view=rev
Author:   dooglus
Date:     2008-11-07 15:06:42 +0000 (Fri, 07 Nov 2008)

Log Message:
-----------
Finding the distance along a bezier curve from point x to point x was failing 
with a division by zero.  Fix by always returning 0 in that case.

Modified Paths:
--------------
    ETL/trunk/ETL/_bezier.h

Modified: ETL/trunk/ETL/_bezier.h
===================================================================
--- ETL/trunk/ETL/_bezier.h     2008-11-06 17:29:46 UTC (rev 2162)
+++ ETL/trunk/ETL/_bezier.h     2008-11-07 15:06:42 UTC (rev 2163)
@@ -577,6 +577,7 @@
        distance_type find_distance(time_type r, time_type s, int steps=7)const
        {
                const time_type inc((s-r)/steps);
+               if (!inc) return 0;
                distance_type ret(0);
                value_type last(operator()(r));
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to