Home | History | Annotate | Download | only in range

Lines Matching refs:Range

5 #include "ui/gfx/range/range.h"
16 Range::Range()
21 Range::Range(size_t start, size_t end)
26 Range::Range(size_t position)
32 const Range Range::InvalidRange() {
33 return Range(std::numeric_limits<size_t>::max());
36 bool Range::IsValid() const {
40 size_t Range::GetMin() const {
44 size_t Range::GetMax() const {
48 bool Range::operator==(const Range& other) const {
52 bool Range::operator!=(const Range& other) const {
56 bool Range::EqualsIgnoringDirection(const Range& other) const {
60 bool Range::Intersects(const Range& range) const {
61 return IsValid() && range.IsValid() &&
62 !(range.GetMax() < GetMin() || range.GetMin() >= GetMax());
65 bool Range::Contains(const Range& range) const {
66 return IsValid() && range.IsValid() &&
67 GetMin() <= range.GetMin() && range.GetMax() <= GetMax();
70 Range Range::Intersect(const Range& range) const {
71 size_t min = std::max(GetMin(), range.GetMin());
72 size_t max = std::min(GetMax(), range.GetMax());
77 return Range(min, max);
80 std::string Range::ToString() const {
84 std::ostream& operator<<(std::ostream& os, const Range& range) {
85 return os << range.ToString();