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

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

Issue 10548047: Remove frog from the repository. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move test and update apidoc.gyp. Created 8 years, 6 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
« no previous file with comments | « frog/lib/natives.dart ('k') | frog/lib/string_base.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
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.
4
5 // Dart core library.
6
7 interface num extends Comparable, Hashable {
8 // Arithmetic operations.
9 num operator +(num other);
10 num operator -(num other);
11 num operator *(num other);
12 num operator %(num other);
13 num operator /(num other);
14 // Truncating division.
15 num operator ~/(num other);
16 // The unary '-' operator.
17 num operator negate();
18 num remainder(num other);
19
20 // Relational operations.
21 bool operator <(num other);
22 bool operator <=(num other);
23 bool operator >(num other);
24 bool operator >=(num other);
25
26 // TODO(jimhug): Cheap trick...
27 bool operator ==(var other);
28
29
30 // Predicates.
31 bool isEven();
32 bool isOdd();
33 bool isNaN();
34 bool isNegative();
35 bool isInfinite();
36
37 num abs();
38 num round();
39 num floor();
40 num ceil();
41 num truncate();
42
43 int toInt();
44 double toDouble();
45
46 String toStringAsFixed(int fractionDigits);
47 String toStringAsExponential(int fractionDigits);
48 String toStringAsPrecision(int precision);
49 String toRadixString(int radix);
50
51 // TODO(jmesserly): we need to do something in the Frog type system to know
52 // to know that most int operations are closed over integers.
53
54 // TODO(jimhug): Bit-operations stolen from int
55 int operator &(int other);
56 int operator |(int other);
57 int operator ^(int other);
58 int operator ~();
59 int operator <<(int shiftAmount);
60 int operator >>(int shiftAmount);
61 }
OLDNEW
« no previous file with comments | « frog/lib/natives.dart ('k') | frog/lib/string_base.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698