@@ -151,7 +151,7 @@ library Checkpoints {
151151 }
152152
153153 /**
154- * @dev Return the index of the oldest checkpoint whose key is greater than the search key, or `high` if there is none.
154+ * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none.
155155 * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.
156156 *
157157 * WARNING: `high` should not be greater than the array's length.
@@ -174,7 +174,7 @@ library Checkpoints {
174174 }
175175
176176 /**
177- * @dev Return the index of the oldest checkpoint whose key is greater or equal than the search key, or `high` if there is none.
177+ * @dev Return the index of the first ( oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none.
178178 * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.
179179 *
180180 * WARNING: `high` should not be greater than the array's length.
@@ -225,7 +225,7 @@ library Checkpoints {
225225 }
226226
227227 /**
228- * @dev Returns the value in the oldest checkpoint with key greater or equal than the search key, or zero if there is none.
228+ * @dev Returns the value in the first ( oldest) checkpoint with key greater or equal than the search key, or zero if there is none.
229229 */
230230 function lowerLookup (Trace224 storage self , uint32 key ) internal view returns (uint224 ) {
231231 uint256 len = self._checkpoints.length ;
@@ -234,7 +234,7 @@ library Checkpoints {
234234 }
235235
236236 /**
237- * @dev Returns the value in the most recent checkpoint with key lower or equal than the search key.
237+ * @dev Returns the value in the last ( most recent) checkpoint with key lower or equal than the search key.
238238 */
239239 function upperLookup (Trace224 storage self , uint32 key ) internal view returns (uint224 ) {
240240 uint256 len = self._checkpoints.length ;
@@ -243,7 +243,7 @@ library Checkpoints {
243243 }
244244
245245 /**
246- * @dev Returns the value in the most recent checkpoint with key lower or equal than the search key.
246+ * @dev Returns the value in the last ( most recent) checkpoint with key lower or equal than the search key.
247247 *
248248 * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high keys).
249249 */
@@ -324,7 +324,7 @@ library Checkpoints {
324324 }
325325
326326 /**
327- * @dev Return the index of the oldest checkpoint whose key is greater than the search key, or `high` if there is none.
327+ * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none.
328328 * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.
329329 *
330330 * WARNING: `high` should not be greater than the array's length.
@@ -347,7 +347,7 @@ library Checkpoints {
347347 }
348348
349349 /**
350- * @dev Return the index of the oldest checkpoint whose key is greater or equal than the search key, or `high` if there is none.
350+ * @dev Return the index of the first ( oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none.
351351 * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.
352352 *
353353 * WARNING: `high` should not be greater than the array's length.
@@ -401,7 +401,7 @@ library Checkpoints {
401401 }
402402
403403 /**
404- * @dev Returns the value in the oldest checkpoint with key greater or equal than the search key, or zero if there is none.
404+ * @dev Returns the value in the first ( oldest) checkpoint with key greater or equal than the search key, or zero if there is none.
405405 */
406406 function lowerLookup (Trace160 storage self , uint96 key ) internal view returns (uint160 ) {
407407 uint256 len = self._checkpoints.length ;
@@ -410,7 +410,7 @@ library Checkpoints {
410410 }
411411
412412 /**
413- * @dev Returns the value in the most recent checkpoint with key lower or equal than the search key.
413+ * @dev Returns the value in the last ( most recent) checkpoint with key lower or equal than the search key.
414414 */
415415 function upperLookup (Trace160 storage self , uint96 key ) internal view returns (uint160 ) {
416416 uint256 len = self._checkpoints.length ;
@@ -419,7 +419,7 @@ library Checkpoints {
419419 }
420420
421421 /**
422- * @dev Returns the value in the most recent checkpoint with key lower or equal than the search key.
422+ * @dev Returns the value in the last ( most recent) checkpoint with key lower or equal than the search key.
423423 *
424424 * NOTE: This is a variant of {upperLookup} that is optimised to find "recent" checkpoint (checkpoints with high keys).
425425 */
@@ -500,7 +500,7 @@ library Checkpoints {
500500 }
501501
502502 /**
503- * @dev Return the index of the oldest checkpoint whose key is greater than the search key, or `high` if there is none.
503+ * @dev Return the index of the last (most recent) checkpoint with key lower or equal than the search key, or `high` if there is none.
504504 * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.
505505 *
506506 * WARNING: `high` should not be greater than the array's length.
@@ -523,7 +523,7 @@ library Checkpoints {
523523 }
524524
525525 /**
526- * @dev Return the index of the oldest checkpoint whose key is greater or equal than the search key, or `high` if there is none.
526+ * @dev Return the index of the first ( oldest) checkpoint with key is greater or equal than the search key, or `high` if there is none.
527527 * `low` and `high` define a section where to do the search, with inclusive `low` and exclusive `high`.
528528 *
529529 * WARNING: `high` should not be greater than the array's length.
0 commit comments