OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 bool operator<=(const Decimal&) const; | 121 bool operator<=(const Decimal&) const; |
122 bool operator>(const Decimal&) const; | 122 bool operator>(const Decimal&) const; |
123 bool operator>=(const Decimal&) const; | 123 bool operator>=(const Decimal&) const; |
124 | 124 |
125 Decimal operator+(const Decimal&) const; | 125 Decimal operator+(const Decimal&) const; |
126 Decimal operator-(const Decimal&) const; | 126 Decimal operator-(const Decimal&) const; |
127 Decimal operator*(const Decimal&)const; | 127 Decimal operator*(const Decimal&)const; |
128 Decimal operator/(const Decimal&) const; | 128 Decimal operator/(const Decimal&) const; |
129 | 129 |
130 int Exponent() const { | 130 int Exponent() const { |
131 ASSERT(IsFinite()); | 131 DCHECK(IsFinite()); |
132 return data_.Exponent(); | 132 return data_.Exponent(); |
133 } | 133 } |
134 | 134 |
135 bool IsFinite() const { return data_.IsFinite(); } | 135 bool IsFinite() const { return data_.IsFinite(); } |
136 bool IsInfinity() const { return data_.IsInfinity(); } | 136 bool IsInfinity() const { return data_.IsInfinity(); } |
137 bool IsNaN() const { return data_.IsNaN(); } | 137 bool IsNaN() const { return data_.IsNaN(); } |
138 bool IsNegative() const { return GetSign() == kNegative; } | 138 bool IsNegative() const { return GetSign() == kNegative; } |
139 bool IsPositive() const { return GetSign() == kPositive; } | 139 bool IsPositive() const { return GetSign() == kPositive; } |
140 bool IsSpecial() const { return data_.IsSpecial(); } | 140 bool IsSpecial() const { return data_.IsSpecial(); } |
141 bool IsZero() const { return data_.IsZero(); } | 141 bool IsZero() const { return data_.IsZero(); } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 Sign GetSign() const { return data_.GetSign(); } | 185 Sign GetSign() const { return data_.GetSign(); } |
186 | 186 |
187 EncodedData data_; | 187 EncodedData data_; |
188 }; | 188 }; |
189 | 189 |
190 PLATFORM_EXPORT std::ostream& operator<<(std::ostream&, const Decimal&); | 190 PLATFORM_EXPORT std::ostream& operator<<(std::ostream&, const Decimal&); |
191 | 191 |
192 } // namespace blink | 192 } // namespace blink |
193 | 193 |
194 #endif // Decimal_h | 194 #endif // Decimal_h |
OLD | NEW |