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

Unified Diff: pkg/intl/lib/number_format.dart

Issue 11748016: Make ~/, round, ceil, floor, truncate return ints. Remove toInt. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Checked mode fixes. Created 7 years, 12 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
Index: pkg/intl/lib/number_format.dart
diff --git a/pkg/intl/lib/number_format.dart b/pkg/intl/lib/number_format.dart
index 4f75d634e81d52b9a12c18111eca5ad042e1e008..7aeafbefdb4bfa36c759ee31e416612ccdfca906 100644
--- a/pkg/intl/lib/number_format.dart
+++ b/pkg/intl/lib/number_format.dart
@@ -156,9 +156,9 @@ class NumberFormat {
void _formatFixed(num number) {
// Round the number.
var power = pow(10, _maximumFractionDigits);
- var intValue = number.truncate().toInt();
+ var intValue = number.truncate();
var multiplied = (number * power).round();
- var fracValue = (multiplied - intValue * power).floor().toInt();
+ var fracValue = (multiplied - intValue * power).floor();
var fractionPresent = _minimumFractionDigits > 0 || fracValue > 0;
// On dartj2s the integer part may be large enough to be a floating

Powered by Google App Engine
This is Rietveld 408576698