third_party/cairo/src/cairo-mesh-pattern-rasterizer.c
static inline void
split_bezier_1D (double  x,  double  y,  double  z,  double  w,
		 double *x0, double *y0, double *z0, double *w0,
		 double *x1, double *y1, double *z1, double *w1)
{
    double tmp;

    *x0 = x;
    *w1 = w;

    tmp = 0.5 * (y + z);
    *y0 = 0.5 * (x + y);
    *z1 = 0.5 * (z + w);

    *z0 = 0.5 * (*y0 + tmp);
    *y1 = 0.5 * (tmp + *z1);

    *w0 = *x1 = 0.5 * (*z0 + *y1);
}
/*
 * Split a 1D Bezier cubic using de Casteljau's algorithm.
 *
 * Input: x,y,z,w the nodes of the Bezier curve
 *
 * Output: x0,y0,z0,w0 and x1,y1,z1,w1 are respectively the nodes of
 *         the first half and of the second half of the curve
 *
 * The output control nodes have to be distinct.
 */
Split a 1D Bezier cubic using de Casteljau's algorithm.
Input: x,y,z,w the nodes of the Bezier curve

x0,y0,z0,w0 and x1,y1,z1,w1 are respectively the nodes of
the first half and of the second half of the curve

The output control nodes have to be distinct.
Split a 1D Bezier cubic using de Casteljau ' s algorithm . Input : x y z w the nodes of the Bezier curve x0 y0 z0 w0 and x1 y1 z1 w1 are respectively the nodes of the first half and of the second half of the curve The output control nodes have to be distinct .
static inline void
split_bezier_1D (double  x,  double  y,  double  z,  double  w,
		 double *x0, double *y0, double *z0, double *w0,
		 double *x1, double *y1, double *z1, double *w1)
{
    double tmp;
    *x0 = x;
    *w1 = w;
    tmp = 0.5 * (y + z);
    *y0 = 0.5 * (x + y);
    *z1 = 0.5 * (z + w);
    *z0 = 0.5 * (*y0 + tmp);
    *y1 = 0.5 * (tmp + *z1);
    *w0 = *x1 = 0.5 * (*z0 + *y1);
}
static inline void split_bezier_1D ( double x , double y , double z , double w , double * x0 , double * y0 , double * z0 , double * w0 , double * x1 , double * y1 , double * z1 , double * w1 ) { double tmp ; * x0 = x ; * w1 = w ; tmp = 0.5 * ( y + z ) ; * y0 = 0.5 * ( x + y ) ; * z1 = 0.5 * ( z + w ) ; * z0 = 0.5 * ( * y0 + tmp ) ; * y1 = 0.5 * ( tmp + * z1 ) ; * w0 = * x1 = 0.5 * ( * z0 + * y1 ) ; }
Split a 1D Bezier cubic using de Casteljau's algorithm.
Split a 1D Bezier cubic using de Casteljau ' s algorithm .