Lines Matching refs:start
192 * Ensures the range of [start, end) is with the range of [0, size).
193 * @param {number} start
196 * @throws {!Error} If start and end are out of range and the check state is
199 function checkRange(start, end, size) {
203 checkCriticalRange(start, end, size);
207 * Ensures the range of [start, end) is with the range of [0, size).
208 * @param {number} start
211 * @throws {!Error} If start and end are out of range and the check state is
214 function checkCriticalRange(start, end, size) {
218 if (start < 0 || end < 0 || start > size || end > size) {
219 throw new Error(`Range error: start: ${start} end: ${end} size: ${size}`);
221 if (start > end) {
222 throw new Error(`Start > end: ${start} > ${end}`);