Index: sdk/lib/core/num.dart |
diff --git a/sdk/lib/core/num.dart b/sdk/lib/core/num.dart |
index 21f23eef18321ab7fc4b59aa397cdbb7ead0b0d6..c18d734c8431544eb8251a958eda20532ab7103c 100644 |
--- a/sdk/lib/core/num.dart |
+++ b/sdk/lib/core/num.dart |
@@ -106,7 +106,7 @@ abstract class num implements Comparable<num> { |
num operator %(num other); |
/** Division operator. */ |
- double operator /(num other); |
+ num operator /(num other); |
/** |
* Truncating division operator. |
@@ -311,6 +311,14 @@ abstract class num implements Comparable<num> { |
*/ |
double toDouble(); |
+ /** Return this [num] as a [fraction]. */ |
+ fraction toFraction(); |
+ |
+ /** Return this [num] as a [fraction] with 100 as the |
+ * denominator. Precision loss may occur. Infinite and NaN |
+ * are not supported. */ |
+ fraction toPercent(); |
+ |
/** |
* Returns a decimal-point string-representation of `this`. |
* |