diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2008-12-13 19:56:16 +0000 |
|---|---|---|
| committer | johanengelen <johanengelen@users.sourceforge.net> | 2008-12-13 19:56:16 +0000 |
| commit | 9d9fc63aac9464b0b642f1818570cf6f6ca601e9 (patch) | |
| tree | db2b45bc112de64ad8fa6018a5b45230ca36ef38 /src/2geom/interval.h | |
| parent | add sketch mode to pencil tool (diff) | |
| download | inkscape-9d9fc63aac9464b0b642f1818570cf6f6ca601e9.tar.gz inkscape-9d9fc63aac9464b0b642f1818570cf6f6ca601e9.zip | |
update to 2geom rev.1723
(bzr r6996)
Diffstat (limited to 'src/2geom/interval.h')
| -rw-r--r-- | src/2geom/interval.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/2geom/interval.h b/src/2geom/interval.h index 009528586..d4dae41b4 100644 --- a/src/2geom/interval.h +++ b/src/2geom/interval.h @@ -258,10 +258,18 @@ inline OptInterval intersect(const Interval & a, const Interval & b) { Coord u = std::max(a.min(), b.min()), v = std::min(a.max(), b.max()); //technically >= might be incorrect, but singulars suck - return u >= v ? OptInterval() + return u > v ? OptInterval() : OptInterval(Interval(u, v)); } +#ifdef _GLIBCXX_IOSTREAM +inline std::ostream &operator<< (std::ostream &os, + const Geom::Interval &I) { + os << "Interval("<<I[0] << ", "<<I[1] << ")"; + return os; +} +#endif + } #endif //SEEN_INTERVAL_H |
