Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: lib/core/num.dart

Issue 10937011: Bug cleanup: unify on allowing radices from 2 to 36 in (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « no previous file | runtime/lib/integers.dart » ('j') | tests/corelib/integer_to_radix_string_test.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698