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

Unified Diff: editor/util/debuggertest/pets.dart

Issue 10829459: Deprecate Math object in corelib in favor of dart:math library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « corelib/src/math.dart ('k') | lib/compiler/implementation/lib/core.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/util/debuggertest/pets.dart
diff --git a/editor/util/debuggertest/pets.dart b/editor/util/debuggertest/pets.dart
index 0d69058a09e63b08257b9d79b44d9fdfce59403a..29c04cce24d1475dc633881e1b6b3430164ec388 100644
--- a/editor/util/debuggertest/pets.dart
+++ b/editor/util/debuggertest/pets.dart
@@ -1,6 +1,8 @@
#library("pets");
+#import('dart:math');
+
final num MAX_CATS = 10;
final SPARKY = const Cat("Sparky");
@@ -52,7 +54,8 @@ class Dog extends FloppyEars implements Animal {
Date bornOn;
Dog(this.name) {
- fleaCount = (Math.random() * 10.0).round().toInt();
+ var rand = new Random();
+ fleaCount = rand.nextInt(10);
bornOn = new Date.now();
}
« no previous file with comments | « corelib/src/math.dart ('k') | lib/compiler/implementation/lib/core.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698