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

Side by Side Diff: runtime/lib/math_patch.dart

Issue 2852053002: Update documentation on trignometric functions. (Closed)
Patch Set: Update fingerprints. Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart ('k') | runtime/vm/method_recognizer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "dart:typed_data"; 5 import "dart:typed_data";
6 6
7 // A VM patch of the dart:math library. 7 // A VM patch of the dart:math library.
8 8
9 // If [x] is an [int] and [exponent] is a non-negative [int], the result is 9 // If [x] is an [int] and [exponent] is a non-negative [int], the result is
10 // an [int], otherwise the result is a [double]. 10 // an [int], otherwise the result is a [double].
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 if (exponent != 0) { 53 if (exponent != 0) {
54 base *= base; 54 base *= base;
55 } 55 }
56 } 56 }
57 return result; 57 return result;
58 } 58 }
59 59
60 @patch 60 @patch
61 double atan2(num a, num b) => _atan2(a.toDouble(), b.toDouble()); 61 double atan2(num a, num b) => _atan2(a.toDouble(), b.toDouble());
62 @patch 62 @patch
63 double sin(num x) => _sin(x.toDouble()); 63 double sin(num radians) => _sin(radians.toDouble());
64 @patch 64 @patch
65 double cos(num x) => _cos(x.toDouble()); 65 double cos(num radians) => _cos(radians.toDouble());
66 @patch 66 @patch
67 double tan(num x) => _tan(x.toDouble()); 67 double tan(num radians) => _tan(radians.toDouble());
68 @patch 68 @patch
69 double acos(num x) => _acos(x.toDouble()); 69 double acos(num x) => _acos(x.toDouble());
70 @patch 70 @patch
71 double asin(num x) => _asin(x.toDouble()); 71 double asin(num x) => _asin(x.toDouble());
72 @patch 72 @patch
73 double atan(num x) => _atan(x.toDouble()); 73 double atan(num x) => _atan(x.toDouble());
74 @patch 74 @patch
75 double sqrt(num x) => _sqrt(x.toDouble()); 75 double sqrt(num x) => _sqrt(x.toDouble());
76 @patch 76 @patch
77 double exp(num x) => _exp(x.toDouble()); 77 double exp(num x) => _exp(x.toDouble());
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } 215 }
216 216
217 bool nextBool() { 217 bool nextBool() {
218 return _getBytes(1).isEven; 218 return _getBytes(1).isEven;
219 } 219 }
220 220
221 // Constants used by the algorithm. 221 // Constants used by the algorithm.
222 static const _POW2_32 = 1 << 32; 222 static const _POW2_32 = 1 << 32;
223 static const _POW2_53_D = 1.0 * (1 << 53); 223 static const _POW2_53_D = 1.0 * (1 << 53);
224 } 224 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart ('k') | runtime/vm/method_recognizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698