Lines Matching defs:upper_bound
156 const HSL& upper_bound) {
160 DCHECK(lower_bound.h < 0 || upper_bound.h < 0 ||
161 (lower_bound.h <= 1 && upper_bound.h <= lower_bound.h + 1))
163 << ", upper_bound.h: " << upper_bound.h;
164 DCHECK(lower_bound.s < 0 || upper_bound.s < 0 ||
165 (lower_bound.s <= upper_bound.s && upper_bound.s <= 1))
167 << ", upper_bound.s: " << upper_bound.s;
168 DCHECK(lower_bound.l < 0 || upper_bound.l < 0 ||
169 (lower_bound.l <= upper_bound.l && upper_bound.l <= 1))
171 << ", upper_bound.l: " << upper_bound.l;
174 bool matches_hue = upper_bound.h > 1
175 ? hsl.h >= lower_bound.h || hsl.h <= upper_bound.h - 1
176 : hsl.h >= lower_bound.h && hsl.h <= upper_bound.h;
177 return (upper_bound.h < 0 || lower_bound.h < 0 || matches_hue) &&
178 (upper_bound.s < 0 || lower_bound.s < 0 ||
179 (hsl.s >= lower_bound.s && hsl.s <= upper_bound.s)) &&
180 (upper_bound.l < 0 || lower_bound.l < 0 ||
181 (hsl.l >= lower_bound.l && hsl.l <= upper_bound.l));