Method
scanDown
(double value, int low, int high)
Source from the content-addressed store, hash-verified
| 328 | } |
| 329 | |
| 330 | private int scanDown(double value, int low, int high) { |
| 331 | for (int i = high - 1; i >= low; i--) { |
| 332 | double that = data[i]; |
| 333 | int cmp = Numbers.compare(that, value); |
| 334 | if (cmp == 0) { |
| 335 | return i; |
| 336 | } |
| 337 | if (cmp < 0) { |
| 338 | return -(i + 2); |
| 339 | } |
| 340 | } |
| 341 | return -(low + 1); |
| 342 | } |
| 343 | |
| 344 | private int scanUp(double value, int low, int high) { |
| 345 | for (int i = low; i < high; i++) { |
Tested by
no test coverage detected