Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // Dart core library. | 5 // Dart core library. |
| 6 | 6 |
| 7 abstract class num implements Comparable, Hashable { | 7 abstract class num implements Comparable, Hashable { |
| 8 // Arithmetic operations. | 8 // Arithmetic operations. |
| 9 abstract num operator +(num other); | 9 abstract num operator +(num other); |
| 10 abstract num operator -(num other); | 10 abstract num operator -(num other); |
| 11 abstract num operator *(num other); | 11 abstract num operator *(num other); |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 33 abstract num floor(); | 33 abstract num floor(); |
| 34 abstract num ceil(); | 34 abstract num ceil(); |
| 35 abstract num truncate(); | 35 abstract num truncate(); |
| 36 | 36 |
| 37 abstract int toInt(); | 37 abstract int toInt(); |
| 38 abstract double toDouble(); | 38 abstract double toDouble(); |
| 39 | 39 |
| 40 abstract String toStringAsFixed(int fractionDigits); | 40 abstract String toStringAsFixed(int fractionDigits); |
| 41 abstract String toStringAsExponential(int fractionDigits); | 41 abstract String toStringAsExponential(int fractionDigits); |
| 42 abstract String toStringAsPrecision(int precision); | 42 abstract String toStringAsPrecision(int precision); |
| 43 | |
| 44 /** | |
| 45 * Converts the [num] to an [int] using [toInt] and then converts to | |
|
Lasse Reichstein Nielsen
2012/09/19 11:43:54
Could we make this comment start with a single-lin
Mads Ager (google)
2012/09/19 14:16:13
Yes, changed to have a one-liner followed by a lon
| |
| 46 * a string representation with the given [radix]. Radix 2 to 36 are | |
| 47 * supported. | |
|
Lasse Reichstein Nielsen
2012/09/19 11:43:54
Either say that the radix must be in the supported
Mads Ager (google)
2012/09/19 14:16:13
Done.
| |
| 48 */ | |
|
Lasse Reichstein Nielsen
2012/09/19 11:43:54
Ok for now. I'm considering whether it really belo
Mads Ager (google)
2012/09/19 14:16:13
Yes, I agree. I think we should use it to int in a
| |
| 43 abstract String toRadixString(int radix); | 49 abstract String toRadixString(int radix); |
| 44 } | 50 } |
| OLD | NEW |