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() { |