Logo Search packages:      
Sourcecode: inkscape version File versions

SBasis Geom::reciprocal ( Linear const &  a,
int  k 

Compute the recpirocal of a

a sbasis functions
sbasis 1/a
It is recommended to use the piecewise version unless you have good reason.

Definition at line 397 of file sbasis.cpp.

    SBasis c;
    c.resize(k, Linear(0,0));
    double r_s0 = (a.tri()*a.tri())/(-a[0]*a[1]);
    double r_s0k = 1;
    for(unsigned i = 0; i < (unsigned)k; i++) {
        c[i] = Linear(r_s0k/a[0], r_s0k/a[1]);
        r_s0k *= r_s0;
    return c;

Generated by  Doxygen 1.6.0   Back to index