Lines Matching defs:fromIndexValue
26 // Common procedure to clamp fromIndexValue to the range [0, length].
29 auto doClamp = [length](auto fromIndexValue) -> int64_t {
30 if (LIKELY(fromIndexValue >= 0)) {
31 // Including the case where fromIndexValue == Infinity
32 return (fromIndexValue >= length) ? length : static_cast<int64_t>(fromIndexValue);
34 auto plusLength = fromIndexValue + length;
38 return 0; // Including the case where fromIndexValue == -Infinity
48 double fromIndexValue = base::NumberHelper::TruncateDouble(fromIndexTemp.GetNumber()); // NaN -> 0
49 return doClamp(fromIndexValue);
66 // Common procedure to clamp fromIndexValue to the range [-1, length-1].
67 auto doClamp = [length](auto fromIndexValue) -> int64_t {
68 if (LIKELY(fromIndexValue >= 0)) {
69 // Including the case where fromIndexValue == Infinity
70 return (length - 1 < fromIndexValue) ? (length - 1) : static_cast<int64_t>(fromIndexValue);
72 auto plusLength = fromIndexValue + length;
76 return -1; // Including the case where fromIndexValue == -Infinity
86 double fromIndexValue = base::NumberHelper::TruncateDouble(fromIndexTemp.GetNumber()); // NaN -> 0
87 return doClamp(fromIndexValue);