Returns the intersection of the ranges [x, x + x_size) and [y, y + y_size)
| 142 | |
| 143 | // Returns the intersection of the ranges [x, x + x_size) and [y, y + y_size) |
| 144 | static inline vvl::range<int64_t> GetRangeIntersection(int64_t x, uint64_t x_size, int64_t y, uint64_t y_size) { |
| 145 | int64_t intersection_min = std::max(x, y); |
| 146 | int64_t intersection_max = std::min(x + static_cast<int64_t>(x_size), y + static_cast<int64_t>(y_size)); |
| 147 | |
| 148 | return {intersection_min, intersection_max}; |
| 149 | } |
no outgoing calls
no test coverage detected