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

Unified Diff: corelib/unified/math/base.dart

Issue 10696147: Patch methods in classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Small type/typo fixes Created 8 years, 5 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 | corelib/unified/math/math.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: corelib/unified/math/base.dart
diff --git a/lib/math/base.dart b/corelib/unified/math/base.dart
similarity index 74%
copy from lib/math/base.dart
copy to corelib/unified/math/base.dart
index f983e966963922870f4f50171b09e3e627487225..75696e842aafc879eb264a9c3482842a095bd88a 100644
--- a/lib/math/base.dart
+++ b/corelib/unified/math/base.dart
@@ -49,14 +49,14 @@ final double SQRT2 = 1.4142135623730951;
* an [int]. Throws a [BadNumberFormatException] if [str]
* cannot be parsed as an [int].
*/
-int parseInt(String str) => MathNatives.parseInt(str);
+external int parseInt(String str);
/**
* Parses a [String] representation of a [double], and returns
* a [double]. Throws a [BadNumberFormatException] if [str] cannot
* be parsed as a [double].
*/
-double parseDouble(String str) => MathNatives.parseDouble(str);
+external double parseDouble(String str);
num min(num a, num b) {
int c = a.compareTo(b);
@@ -78,20 +78,20 @@ num max(num a, num b) {
/**
* Returns the arc tangent of [a]/[b] with sign according to quadrant.
*/
-double atan2(num a, num b) => MathNatives.atan2(a, b);
+external double atan2(num a, num b);
/**
* If the [exponent] is an integer the result is of the same type as [x].
* Otherwise it is a [double].
*/
-num pow(num x, num exponent) => MathNatives.pow(x, exponent);
-
-double sin(num x) => MathNatives.sin(x);
-double cos(num x) => MathNatives.cos(x);
-double tan(num x) => MathNatives.tan(x);
-double acos(num x) => MathNatives.acos(x);
-double asin(num x) => MathNatives.asin(x);
-double atan(num x) => MathNatives.atan(x);
-double sqrt(num x) => MathNatives.sqrt(x);
-double exp(num x) => MathNatives.exp(x);
-double log(num x) => MathNatives.log(x);
+external num pow(num x, num exponent);
+
+external double sin(num x);
+external double cos(num x);
+external double tan(num x);
+external double acos(num x);
+external double asin(num x);
+external double atan(num x);
+external double sqrt(num x);
+external double exp(num x);
+external double log(num x);
« no previous file with comments | « no previous file | corelib/unified/math/math.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698