diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-05-18 18:31:07 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-05-18 18:31:07 +0000 |
| commit | c4a8aa22993237bb1bf8ee210263fb6a3b20a698 (patch) | |
| tree | 5badc110961445c13bdd2100a9cd6a451ca977d4 /src | |
| parent | noop: add 'end of #includes' indicator in effect.cpp to simplify scripting (diff) | |
| download | inkscape-c4a8aa22993237bb1bf8ee210263fb6a3b20a698.tar.gz inkscape-c4a8aa22993237bb1bf8ee210263fb6a3b20a698.zip | |
Convenience access functions for first and last value of a Geom::Piecewise<>
(bzr r5692)
Diffstat (limited to 'src')
| -rw-r--r-- | src/2geom/piecewise.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/2geom/piecewise.h b/src/2geom/piecewise.h index d548ea0e9..3b115cb95 100644 --- a/src/2geom/piecewise.h +++ b/src/2geom/piecewise.h @@ -73,6 +73,12 @@ class Piecewise { unsigned n = segN(t); return segs[n](segT(t, n)); } + inline output_type firstValue() const { + return valueAt(cuts.front()); + } + inline output_type lastValue() const { + return valueAt(cuts.back()); + } std::vector<output_type> valueAndDerivatives(double t, unsigned cnt) const { unsigned n = segN(t); std::vector<output_type> ret, val = segs[n].valueAndDerivatives(segT(t, n), cnt); |
