Skip to content

Commit

Permalink
libdeng2|Range: Added isEmpty() method
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jul 28, 2013
1 parent c0de527 commit 83fc6b8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions doomsday/libdeng2/include/de/core/range.h
Expand Up @@ -37,6 +37,7 @@ struct Range
Type end;

explicit Range(Type const &a = 0, Type const &b = 0) : start(a), end(b) {}
inline bool isEmpty() const { return end == start; }
inline Type size() const { return end - start; }
inline bool contains(Type const &i) const { return i >= start && i < end; }
inline Type clamp(Type const &i) const {
Expand Down

0 comments on commit 83fc6b8

Please sign in to comment.