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

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

Issue 9270048: Lots of frog cleanup (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 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) 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 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 interface num extends Comparable, Hashable { 7 interface num extends Comparable, Hashable {
8 // Arithmetic operations. 8 // Arithmetic operations.
9 num operator +(num other); 9 num operator +(num other);
10 num operator -(num other); 10 num operator -(num other);
11 num operator *(num other); 11 num operator *(num other);
12 num operator %(num other); 12 num operator %(num other);
13 num operator /(num other); 13 num operator /(num other);
14 // Truncating division. 14 // Truncating division.
15 num operator ~/(num other); 15 num operator ~/(num other);
16 // The unary '-' operator. 16 // The unary '-' operator.
17 num operator negate(); 17 num operator negate();
18 num remainder(num other); 18 num remainder(num other);
19 19
20 // Relational operations. 20 // Relational operations.
21 bool operator <(num other); 21 bool operator <(num other);
22 bool operator <=(num other); 22 bool operator <=(num other);
23 bool operator >(num other); 23 bool operator >(num other);
24 bool operator >=(num other); 24 bool operator >=(num other);
25 25
26 // TODO(jimhug): Cheap trick...
27 bool operator ==(var other);
28
29
26 // Predicates. 30 // Predicates.
27 bool isEven(); 31 bool isEven();
28 bool isOdd(); 32 bool isOdd();
29 bool isNaN(); 33 bool isNaN();
30 bool isNegative(); 34 bool isNegative();
31 bool isInfinite(); 35 bool isInfinite();
32 36
33 num abs(); 37 num abs();
34 num round(); 38 num round();
35 num floor(); 39 num floor();
(...skipping 12 matching lines...) Expand all
48 // to know that most int operations are closed over integers. 52 // to know that most int operations are closed over integers.
49 53
50 // TODO(jimhug): Bit-operations stolen from int 54 // TODO(jimhug): Bit-operations stolen from int
51 int operator &(int other); 55 int operator &(int other);
52 int operator |(int other); 56 int operator |(int other);
53 int operator ^(int other); 57 int operator ^(int other);
54 int operator ~(); 58 int operator ~();
55 int operator <<(int shiftAmount); 59 int operator <<(int shiftAmount);
56 int operator >>(int shiftAmount); 60 int operator >>(int shiftAmount);
57 } 61 }
OLDNEW
« frog/gen.dart ('K') | « frog/lib/corelib_impl.dart ('k') | frog/lib/string_base.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698