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
// (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;
result.x3 = (x3 - bounds.x)/bounds.w;
}
- if (bounds.h == 0)
+ if (bounds.h == BReal(0))
{
result.y0 = 0;
result.y1 = 0;