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

Unified Diff: samples/spirodraw/Spirodraw.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/solar3d/web/sphere_model_data.dart ('k') | samples/swarm/DataSource.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/spirodraw/Spirodraw.dart
diff --git a/samples/spirodraw/Spirodraw.dart b/samples/spirodraw/Spirodraw.dart
index 98e03c39883d3da76871a40f7028169407300656..1addd8e3672d4d62b7fe9cd87f06711fac96c733 100644
--- a/samples/spirodraw/Spirodraw.dart
+++ b/samples/spirodraw/Spirodraw.dart
@@ -157,7 +157,7 @@ class Spirodraw {
if (run && rad <= maxTurns * PI2) {
rad+=stepSize;
drawFrame(rad);
- int nTurns = (rad / PI2).toInt();
+ int nTurns = rad ~/ PI2;
numTurns.text = '${nTurns}/$maxTurns';
window.requestAnimationFrame(animate);
} else {
@@ -178,7 +178,7 @@ class Spirodraw {
int ru = rUnits.abs();
int wrUnits = RUnits + rUnits;
int g = gcf (wrUnits, ru);
- return (ru ~/ g).toInt();
+ return ru ~/ g;
}
void stop() {
« no previous file with comments | « samples/solar3d/web/sphere_model_data.dart ('k') | samples/swarm/DataSource.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698