summaryrefslogtreecommitdiff
path: root/range.h
diff options
context:
space:
mode:
authorLukáš Lalinský <lalinsky@gmail.com>2008-12-06 16:42:27 +0100
committerLukáš Lalinský <lalinsky@gmail.com>2008-12-06 16:42:27 +0100
commit96167c7e44272d23f55735f276b14e64e30179fa (patch)
tree9c3be28998cbf26f6cb584c25e7e6d663b6696f6 /range.h
parent6b6a46108e662073c9eb5d7a38506c9124a1c69e (diff)
downloaddbmodel-96167c7e44272d23f55735f276b14e64e30179fa.tar.xz
Add support for multi-segment connection lines
Diffstat (limited to 'range.h')
-rw-r--r--range.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/range.h b/range.h
index e8622e2..1c0bbf1 100644
--- a/range.h
+++ b/range.h
@@ -33,6 +33,7 @@ public:
bool isNull() const { return m_max == m_min; }
T length() const { return m_max - m_min; }
+ T center() const { return m_min + length() / 2; }
Range<T> intersected(const Range<T> &other) const
{