Logo Search packages:      
Sourcecode: inkscape version File versions

OptInterval Geom::bounds_exact ( SBasis const &  a  ) 

Find the smallest interval that bounds a

Parameters:
a sbasis function
Returns:
inteval

Definition at line 72 of file sbasis-roots.cpp.

References Geom::Interval::extendTo().

                                          {
    Interval result = Interval(a.at0(), a.at1());
    SBasis df = derivative(a);
    vector<double>extrema = roots(df);
    for (unsigned i=0; i<extrema.size(); i++){
        result.extendTo(a(extrema[i]));
    }
    return result;
}


Generated by  Doxygen 1.6.0   Back to index