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

Unified Diff: runtime/lib/double.dart

Issue 28973002: Add isFinite getter to num. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Change comments to not use "whether". Created 7 years, 2 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 | « no previous file | runtime/lib/integers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/double.dart
diff --git a/runtime/lib/double.dart b/runtime/lib/double.dart
index 6480f5d7a47b9d78ea1339c815c182cdc87f1fe8..c5b2c38156fadf276781a60003f152997041159b 100644
--- a/runtime/lib/double.dart
+++ b/runtime/lib/double.dart
@@ -96,6 +96,7 @@ class _Double implements double {
bool get isNegative native "Double_getIsNegative";
bool get isInfinite native "Double_getIsInfinite";
bool get isNaN native "Double_getIsNaN";
+ bool get isFinite => !isInfinite && !isNaN; // Can be optimized.
double abs() {
// Handle negative 0.0.
« no previous file with comments | « no previous file | runtime/lib/integers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698