Merge branch terrible and branch awful
[ipdf/code.git] / src / bezier.h
index d3c0e2d..298bcf3 100644 (file)
@@ -20,7 +20,7 @@ namespace IPDF
        
        extern std::vector<BReal> SolveQuadratic(const BReal & a, const BReal & b, const BReal & c, const BReal & min = 0, const BReal & max = 1);
 
-       extern std::vector<BReal> SolveCubic(const BReal & a, const BReal & b, const BReal & c, const BReal & d, const BReal & min = 0, const BReal & max = 1, const BReal & delta = 1e-9);
+       extern std::vector<BReal> SolveCubic(const BReal & a, const BReal & b, const BReal & c, const BReal & d, const BReal & min = 0, const BReal & max = 1, const BReal & delta = 1e-5);
 
        /** A _cubic_ bezier. **/
        struct Bezier
@@ -151,7 +151,7 @@ namespace IPDF
                        // (So can't just use the Copy constructor on the inverse of bounds)
                        // BRect inverse = {-bounds.x/bounds.w, -bounds.y/bounds.h, BReal(1)/bounds.w, BReal(1)/bounds.h};
                        Bezier result;
-                       if (bounds.w == 0)
+                       if (bounds.w == BReal(0))
                        {
                                result.x0 = 0;
                                result.x1 = 0;
@@ -166,7 +166,7 @@ namespace IPDF
                                result.x3 = (x3 - bounds.x)/bounds.w;
                        }
 
-                       if (bounds.h == 0)
+                       if (bounds.h == BReal(0))
                        {
                                result.y0 = 0;
                                result.y1 = 0;

UCC git Repository :: git.ucc.asn.au