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

Unified Diff: runtime/lib/integers.dart

Issue 12317107: ceil/floor/truncate/round return integers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload due to error3 Created 7 years, 9 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 | « runtime/lib/double.dart ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/integers.dart
diff --git a/runtime/lib/integers.dart b/runtime/lib/integers.dart
index fa3bb8e5c511d1a453227d1b17c1524b0cb17706..8ee9dd35e416f4bda7460d56e0b280c2b487efb8 100644
--- a/runtime/lib/integers.dart
+++ b/runtime/lib/integers.dart
@@ -131,6 +131,11 @@ class _IntegerImplementation {
int ceil() { return this; }
int truncate() { return this; }
+ double roundToDouble() { return this.toDouble(); }
+ double floorToDouble() { return this.toDouble(); }
+ double ceilToDouble() { return this.toDouble(); }
+ double truncateToDouble() { return this.toDouble(); }
+
num clamp(num lowerLimit, num upperLimit) {
if (lowerLimit is! num) throw new ArgumentError(lowerLimit);
if (upperLimit is! num) throw new ArgumentError(upperLimit);
« no previous file with comments | « runtime/lib/double.dart ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698