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

Unified Diff: sdk/lib/core/num.dart

Issue 16285004: Better documentation on Sets and Maps, and more. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 6 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/core/list.dart ('k') | sdk/lib/core/set.dart » ('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 eb8f82ce4779381c28a5a63de5b411b4081b9333..19dbbe2749c4ad5fc9f748a849a8998225e1ef7b 100644
--- a/sdk/lib/core/num.dart
+++ b/sdk/lib/core/num.dart
@@ -22,7 +22,7 @@ abstract class num implements Comparable<num> {
*
* Returns the remainder of the euclidean division. The euclidean division of
* two integers `a` and `b` yields two integers `q` and `r` such that
- * `a = b*q + r` and `0 <= r < |a|`.
+ * `a == b*q + r` and `0 <= r < a.abs()`.
*
* The euclidean division is only defined for integers, but can be easily
* extended to work with doubles. In that case `r` may have a non-integer
@@ -51,10 +51,10 @@ abstract class num implements Comparable<num> {
/** Negate operator. */
num operator -();
- /**
- * Return the remainder of the truncating division of `this` by [other].
+ /**
+ * Returns the remainder of the truncating division of `this` by [other].
*
- * The result `r` of this operation satisfies: `this = this ~/ other + r`.
+ * The result `r` of this operation satisfies: `this == this ~/ other + r`.
* As a consequence the remainder `r` has the same sign as the dividend
* `this`.
*/
@@ -165,8 +165,8 @@ abstract class num implements Comparable<num> {
double toDouble();
/**
- * Converts [this] to a string representation with [fractionDigits] digits
- * after the decimal point.
+ * Converts [this] to a [double] and then gives string representation with
+ * [fractionDigits] digits after the decimal point.
*
* The parameter [fractionDigits] must be an integer satisfying:
* [:0 <= fractionDigits <= 20:].
@@ -174,8 +174,8 @@ abstract class num implements Comparable<num> {
String toStringAsFixed(int fractionDigits);
/**
- * Converts [this] to a string in decimal exponential notation with
- * [fractionDigits] digits after the decimal point.
+ * Converts [this] to a [double] and then gives a string in decimal
+ * exponential notation with [fractionDigits] digits after the decimal point.
*
* If [fractionDigits] is given then it must be an integer satisfying:
* [:0 <= fractionDigits <= 20:]. Without the parameter the returned string
@@ -184,13 +184,11 @@ abstract class num implements Comparable<num> {
String toStringAsExponential([int fractionDigits]);
/**
- * Converts [this] to a string representation with [precision] significant
- * digits.
+ * Converts [this] to a double and gives a string representation with
+ * [precision] significant digits.
*
* The parameter [precision] must be an integer satisfying:
* [:1 <= precision <= 21:].
*/
String toStringAsPrecision(int precision);
-
-
}
« no previous file with comments | « sdk/lib/core/list.dart ('k') | sdk/lib/core/set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698