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