Home
last modified time | relevance | path

Searched refs:ClampedNumeric (Results 1 – 5 of 5) sorted by relevance

/external/libchrome/base/numerics/
Dclamped_math.h19 class ClampedNumeric {
26 constexpr ClampedNumeric() : value_(0) {} in ClampedNumeric() function
30 constexpr ClampedNumeric(const ClampedNumeric<Src>& rhs) in ClampedNumeric() function
34 friend class ClampedNumeric; variable
39 constexpr ClampedNumeric(Src value) // NOLINT(runtime/explicit) in ClampedNumeric() function
47 constexpr ClampedNumeric( in ClampedNumeric() function
54 constexpr ClampedNumeric<typename UnderlyingType<Dst>::type> Cast() const { in Cast()
60 constexpr ClampedNumeric& operator+=(const Src rhs);
62 constexpr ClampedNumeric& operator-=(const Src rhs);
64 constexpr ClampedNumeric& operator*=(const Src rhs);
[all …]
DREADME.md13 * `clamped_math.h` contains the `ClampedNumeric` template class and
26 * `StrictNumeric` coerces to `ClampedNumeric` and `CheckedNumeric`
27 * `ClampedNumeric` coerces to `CheckedNumeric`
81 Both the `StrictNumeric` and `ClampedNumeric` types provide well defined
126 conditions. The `ClampedNumeric` template addresses this by providing
129 Here's an example of using a `ClampedNumeric` to calculate an operation
142 The `ClampedNumeric` type is not "sticky", which means the saturation is not
148 ClampedNumeric<int> value = INT_MAX;
320 ## ClampedNumeric<> in clamped_math.h
322 `ClampedNumeric<>` implements all the logic and operators for clamped
[all …]
Dsafe_conversions_impl.h598 class ClampedNumeric;
623 struct UnderlyingType<ClampedNumeric<T>> {
/external/libchrome/base/
Dsafe_numerics_unittest.cc120 U GetNumericValueForTest(const ClampedNumeric<U>& src) { in GetNumericValueForTest()
159 constexpr T GetValue(const ClampedNumeric<T>& src) { in GetValue()
164 constexpr T GetValueAsDest(const ClampedNumeric<U>& src) { in GetValueAsDest()
216 -ClampedNumeric<Dst>(DstLimits::lowest())); in TestSpecializedArithmetic()
218 ClampedNumeric<Dst>(DstLimits::lowest()).Abs()); in TestSpecializedArithmetic()
219 TEST_EXPECTED_VALUE(1, ClampedNumeric<Dst>(-1).Abs()); in TestSpecializedArithmetic()
229 ClampedNumeric<Dst>(DstLimits::max()) + -1); in TestSpecializedArithmetic()
231 ClampedNumeric<Dst>(DstLimits::lowest()) + -1); in TestSpecializedArithmetic()
234 ClampedNumeric<Dst>(DstLimits::lowest()) + DstLimits::lowest()); in TestSpecializedArithmetic()
244 ClampedNumeric<Dst>(DstLimits::lowest()) - 1); in TestSpecializedArithmetic()
[all …]
/external/pdfium/third_party/base/numerics/
Dsafe_conversions_impl.h599 class ClampedNumeric;
624 struct UnderlyingType<ClampedNumeric<T>> {