Logo Search packages:      
Sourcecode: inkscape version File versions  Download package

Piecewise< SBasis > Geom::cos ( Piecewise< SBasis > const &  f,
double  tol,
int  order 
)

Compute the cosine of a function.

Parameters:
f function
tol maximum error
order maximum degree polynomial to use

Definition at line 223 of file sbasis-math.cpp.

References Geom::Piecewise< T >::concat(), Geom::Piecewise< T >::cuts, Geom::Piecewise< T >::segs, Geom::Piecewise< T >::setDomain(), and Geom::Piecewise< T >::size().

Referenced by cos(), sin(), and tan2().

                                                                        {
    Piecewise<SBasis> result;
    for (unsigned i=0; i<f.size(); i++){
        Piecewise<SBasis> cosfi = cos(f.segs[i],tol,order);
        cosfi.setDomain(Interval(f.cuts[i],f.cuts[i+1]));
        result.concat(cosfi);
    }
    return result;
}


Generated by  Doxygen 1.6.0   Back to index