| OLD | NEW |
| 1 part of dart.core; | 1 part of dart.core; |
| 2 | 2 abstract class num implements Comparable<num> {bool operator ==(Object other); |
| 3 abstract class num implements Comparable<num> { | 3 int get hashCode; |
| 4 bool operator ==(Object other); | 4 int compareTo(num other); |
| 5 int get hashCode; | 5 num operator +(num other); |
| 6 int compareTo(num other); | 6 num operator -(num other); |
| 7 num operator +(num other); | 7 num operator *(num other); |
| 8 num operator -(num other); | 8 num operator %(num other); |
| 9 num operator *(num other); | 9 double operator /(num other); |
| 10 num operator %(num other); | 10 int operator ~/(num other); |
| 11 double operator /(num other); | 11 num operator -(); |
| 12 int operator ~/(num other); | 12 num remainder(num other); |
| 13 num operator -(); | 13 bool operator <(num other); |
| 14 num remainder(num other); | 14 bool operator <=(num other); |
| 15 bool operator <(num other); | 15 bool operator >(num other); |
| 16 bool operator <=(num other); | 16 bool operator >=(num other); |
| 17 bool operator >(num other); | 17 bool get isNaN; |
| 18 bool operator >=(num other); | 18 bool get isNegative; |
| 19 bool get isNaN; | 19 bool get isInfinite; |
| 20 bool get isNegative; | 20 bool get isFinite; |
| 21 bool get isInfinite; | 21 num abs(); |
| 22 bool get isFinite; | 22 num get sign; |
| 23 num abs(); | 23 int round(); |
| 24 num get sign; | 24 int floor(); |
| 25 int round(); | 25 int ceil(); |
| 26 int floor(); | 26 int truncate(); |
| 27 int ceil(); | 27 double roundToDouble(); |
| 28 int truncate(); | 28 double floorToDouble(); |
| 29 double roundToDouble(); | 29 double ceilToDouble(); |
| 30 double floorToDouble(); | 30 double truncateToDouble(); |
| 31 double ceilToDouble(); | 31 num clamp(num lowerLimit, num upperLimit); |
| 32 double truncateToDouble(); | 32 int toInt(); |
| 33 num clamp(num lowerLimit, num upperLimit); | 33 double toDouble(); |
| 34 int toInt(); | 34 String toStringAsFixed(int fractionDigits); |
| 35 double toDouble(); | 35 String toStringAsExponential([int fractionDigits]); |
| 36 String toStringAsFixed(int fractionDigits); | 36 String toStringAsPrecision(int precision); |
| 37 String toStringAsExponential([int fractionDigits]); | 37 String toString(); |
| 38 String toStringAsPrecision(int precision); | 38 static num parse(String input, [num onError(String input)]) { |
| 39 String toString(); | 39 String source = input.trim(); |
| 40 static num parse(String input, [num onError(String input)]) { | 40 _parseError = false; |
| 41 String source = input.trim(); | 41 num result = int.parse(source, onError: _onParseErrorInt); |
| 42 _parseError = false; | 42 if (!_parseError) return result; |
| 43 num result = int.parse(source, onError: _onParseErrorInt); | 43 _parseError = false; |
| 44 if (!_parseError) return result; | 44 result = double.parse(source, _onParseErrorDouble); |
| 45 _parseError = false; | 45 if (!_parseError) return result; |
| 46 result = double.parse(source, _onParseErrorDouble); | 46 if (onError == null) throw new FormatException(input); |
| 47 if (!_parseError) return result; | 47 return onError(input); |
| 48 if (onError == null) throw new FormatException(input); | |
| 49 return onError(input); | |
| 50 } | 48 } |
| 51 static bool _parseError = false; | 49 static bool _parseError = false; |
| 52 static int _onParseErrorInt(String _) { | 50 static int _onParseErrorInt(String _) { |
| 53 _parseError = true; | 51 _parseError = true; |
| 54 return 0; | 52 return 0; |
| 55 } | 53 } |
| 56 static double _onParseErrorDouble(String _) { | 54 static double _onParseErrorDouble(String _) { |
| 57 _parseError = true; | 55 _parseError = true; |
| 58 return 0.0; | 56 return 0.0; |
| 59 } | 57 } |
| 60 } | 58 } |
| OLD | NEW |