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/_internal/lib/js_number.dart

Issue 28973002: Add isFinite getter to num. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: sdk/lib/_internal/lib/js_number.dart
diff --git a/sdk/lib/_internal/lib/js_number.dart b/sdk/lib/_internal/lib/js_number.dart
index 8dd89d8045e29ce8f0a74dd828a101e9d989961a..e16563c1c9a02f4de3d5dfe4f741f522c046f914 100644
--- a/sdk/lib/_internal/lib/js_number.dart
+++ b/sdk/lib/_internal/lib/js_number.dart
@@ -49,6 +49,8 @@ class JSNumber extends Interceptor implements num {
|| JS('bool', r'# == -Infinity', this);
}
+ bool get isFinite => JS('bool', r'isFinite(#)', this);
+
num remainder(num b) {
checkNull(b); // TODO(ngeoffray): This is not specified but co19 tests it.
if (b is! num) throw new ArgumentError(b);
« no previous file with comments | « runtime/lib/integers.dart ('k') | sdk/lib/core/num.dart » ('j') | sdk/lib/core/num.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698