summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2008-06-14 15:57:11 +0000
committerjohanengelen <johanengelen@users.sourceforge.net>2008-06-14 15:57:11 +0000
commitd3cc918859a1e2a093b6aeb840a8366dbc89548b (patch)
tree9a82eb0d94d5b47730ed1b954337bdcec9153556 /src
parentupdate 2geom, fixes includes (diff)
downloadinkscape-d3cc918859a1e2a093b6aeb840a8366dbc89548b.tar.gz
inkscape-d3cc918859a1e2a093b6aeb840a8366dbc89548b.zip
update 2geom
(bzr r5935)
Diffstat (limited to 'src')
-rw-r--r--src/2geom/interval.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/2geom/interval.h b/src/2geom/interval.h
index c9e6703f5..eb506dc1f 100644
--- a/src/2geom/interval.h
+++ b/src/2geom/interval.h
@@ -46,7 +46,7 @@ namespace Geom {
//
class Interval {
private:
- Coord _b[2];
+ Coord _b[2]; // this should always hold: _b[0] <= _b[1], otherwise the interval is empty.
public:
//TODO: I just know this'll pop up somewhere, starting off someone's interval at 0... I can't see how to avoid this.
@@ -71,7 +71,7 @@ public:
inline Coord extent() const { return _b[1] - _b[0]; }
inline Coord middle() const { return (_b[1] + _b[0]) * 0.5; }
- inline bool isEmpty() const { return _b[0] == _b[1]; }
+ inline bool isEmpty() const { return _b[0] >= _b[1]; }
inline bool contains(Coord val) const { return _b[0] <= val && val <= _b[1]; }
bool contains(const Interval & val) const { return _b[0] <= val._b[0] && val._b[1] <= _b[1]; }
bool intersects(const Interval & val) const {