Searched refs:saturated_cast (Results 1 – 16 of 16) sorted by relevance
17 return base::saturated_cast<int>(std::floor(value)); in ToFlooredInt()21 return base::saturated_cast<int>(std::ceil(value)); in ToCeiledInt()25 return base::saturated_cast<int>(std::floor(value)); in ToFlooredInt()29 return base::saturated_cast<int>(std::ceil(value)); in ToCeiledInt()38 return base::saturated_cast<int>(rounded); in ToRoundedInt()47 return base::saturated_cast<int>(rounded); in ToRoundedInt()
308 int x = base::saturated_cast<int>(std::floor(rect.x() * x_scale)); in ScaleToEnclosingRectSafe()309 int y = base::saturated_cast<int>(std::floor(rect.y() * y_scale)); in ScaleToEnclosingRectSafe()310 int w = base::saturated_cast<int>(std::ceil(rect.width() * x_scale)); in ScaleToEnclosingRectSafe()311 int h = base::saturated_cast<int>(std::ceil(rect.height() * y_scale)); in ScaleToEnclosingRectSafe()
57 return saturated_cast<V>(x + y); in Do()66 return saturated_cast<V>(result); in Do()83 return saturated_cast<V>(x - y); in Do()92 return saturated_cast<V>(result); in Do()114 return saturated_cast<V>(static_cast<Promotion>(x) * in Do()
227 ? saturated_cast<V>(x >> shift)294 return IsGreater<T, U>::Test(x, y) ? saturated_cast<V>(x)295 : saturated_cast<V>(y);311 return IsLess<T, U>::Test(x, y) ? saturated_cast<V>(x)312 : saturated_cast<V>(y);327 return saturated_cast<V>(x OP y); \
31 : value_(saturated_cast<T>(rhs.value_)) {} in ClampedNumeric()40 : value_(saturated_cast<T>(value)) { in ClampedNumeric()49 : value_(saturated_cast<T>(static_cast<Src>(value))) {} in ClampedNumeric()165 return saturated_cast<typename ArithmeticOrUnderlyingEnum<Dst>::type>( in Dst()
192 constexpr Dst saturated_cast(Src value) {331 using internal::saturated_cast;
49 The `saturated_cast` template converts between arbitrary arithmetic types, and55 int int_value = saturated_cast<int>(floating_point_value);171 * `saturated_cast<>()` - Analogous to `static_cast` for numeric types, except
117 Add(saturated_cast<Sample>(time.InMilliseconds())); in AddTimeMillisecondsGranularity()125 Add(saturated_cast<Sample>(time.InMicroseconds())); in AddTimeMicrosecondsGranularity()
691 size = saturated_cast<size_t>(file.GetLength()); in CreateWithFile()
129 constexpr Dst saturated_cast(Src value) { in saturated_cast() function260 using internal::saturated_cast;
39 inline Dst saturated_cast(Src value) { in saturated_cast() function
43 inline Dst saturated_cast(Src value) { in saturated_cast() function
170 *x1 = pdfium::base::saturated_cast<int>(val.first / kBase); in Transform()171 *y1 = pdfium::base::saturated_cast<int>(val.second / kBase); in Transform()194 *x1 = pdfium::base::saturated_cast<int>(val.first / kBase); in Transform()195 *y1 = pdfium::base::saturated_cast<int>(val.second / kBase); in Transform()
151 rtc::saturated_cast<int16_t>(max_encoded_bytes), encoded); in EncodeInternal()
43 return pdfium::base::saturated_cast<uint32_t>( in FlateGetPossiblyTruncatedTotalOut()48 return pdfium::base::saturated_cast<uint32_t>( in FlateGetPossiblyTruncatedTotalIn()
808 count_ = base::saturated_cast<size_t>(backtrace(trace_, count)); in StackTrace()