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

Unified Diff: sdk/lib/core/num.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 | « sdk/lib/_internal/lib/js_number.dart ('k') | tests/corelib/corelib.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/num.dart
diff --git a/sdk/lib/core/num.dart b/sdk/lib/core/num.dart
index 1ef0e16e8dece8d0bc1eb033718785c6a69781e6..674ab2a469f22d96f265a20fdece0016e3bc52a7 100644
--- a/sdk/lib/core/num.dart
+++ b/sdk/lib/core/num.dart
@@ -142,12 +142,30 @@ abstract class num implements Comparable<num> {
/** Relational greater than or equal operator. */
bool operator >=(num other);
+ /** True if the number is the double Not-a-Number value; otherwise, false. */
bool get isNaN;
+ /**
+ * True if the number is negative; otherwise, false.
+ *
+ * Negative numbers are those less than zero, and the double `-0.0`.
+ */
bool get isNegative;
+ /**
+ * True if the number is positive infinity or negative infinity; otherwise,
+ * false.
+ */
bool get isInfinite;
+ /**
+ * True if the number is finite; otherwise, false.
+ *
+ * The only non-finite numbers are NaN, positive infinitity and
+ * negative infinity.
+ */
+ bool get isFinite;
+
/** Returns the absolute value of this [num]. */
num abs();
« no previous file with comments | « sdk/lib/_internal/lib/js_number.dart ('k') | tests/corelib/corelib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698