Make the names for the guards for ETL private headers consistent WRT the number of...
[synfig.git] / ETL / trunk / ETL / _bezier.h
index 67adc32..fe6b170 100644 (file)
 
 /* === S T A R T =========================================================== */
 
-#ifndef __ETL_BEZIER_H
-#define __ETL_BEZIER_H
+#ifndef __ETL__BEZIER_H
+#define __ETL__BEZIER_H
 
 /* === H E A D E R S ======================================================= */
 
 #include "_curve_func.h"
-#include <ETL/fixed>
+#include <cmath>                               // for ldexp
+// #include <ETL/fixed>                        // not used
 
 /* === M A C R O S ========================================================= */
 
@@ -552,8 +553,7 @@ public:
                                bezier<V,T>::operator[](1),
                                bezier<V,T>::operator[](2),
                                bezier<V,T>::operator[](3)};
-                       float t = NearestPointOnCurve(x, array);
-                       return t > 0.999999 ? 0.999999 : t < 0.000001 ? 0.000001 : t;
+                       return NearestPointOnCurve(x, array);
            }
            else
            {
@@ -577,6 +577,7 @@ public:
        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));