OLD | NEW |
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 part of dart.math; | 5 part of dart.math; |
6 | 6 |
7 /** | 7 /** |
8 * Base of the natural logarithms. | 8 * Base of the natural logarithms. |
9 * | 9 * |
10 * Typically written as "e". | 10 * Typically written as "e". |
(...skipping 28 matching lines...) Expand all Loading... |
39 /** | 39 /** |
40 * Square root of 1/2. | 40 * Square root of 1/2. |
41 */ | 41 */ |
42 const double SQRT1_2 = 0.7071067811865476; | 42 const double SQRT1_2 = 0.7071067811865476; |
43 | 43 |
44 /** | 44 /** |
45 * Square root of 2. | 45 * Square root of 2. |
46 */ | 46 */ |
47 const double SQRT2 = 1.4142135623730951; | 47 const double SQRT2 = 1.4142135623730951; |
48 | 48 |
49 /** Temporary redirect to [int.parse]. */ | |
50 int parseInt(String string) => int.parse(string); | |
51 | |
52 /** Temporary redirect to [double.parse]. */ | |
53 double parseDouble(String string) => double.parse(string); | |
54 | |
55 /** | 49 /** |
56 * Returns the lesser of two numbers. | 50 * Returns the lesser of two numbers. |
57 * | 51 * |
58 * Returns NaN if either argument is NaN. | 52 * Returns NaN if either argument is NaN. |
59 * The lesser of [:-0.0:] and [:0.0:] is [:-0.0:]. | 53 * The lesser of [:-0.0:] and [:0.0:] is [:-0.0:]. |
60 * If the arguments are otherwise equal (including int and doubles with the | 54 * If the arguments are otherwise equal (including int and doubles with the |
61 * same mathematical value) then it is unspecified which of the two arguments | 55 * same mathematical value) then it is unspecified which of the two arguments |
62 * is returned. | 56 * is returned. |
63 */ | 57 */ |
64 num min(num a, num b) { | 58 num min(num a, num b) { |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 * Returns NaN if [x] is NaN. | 212 * Returns NaN if [x] is NaN. |
219 */ | 213 */ |
220 external double exp(num x); | 214 external double exp(num x); |
221 | 215 |
222 /** | 216 /** |
223 * Converts [x] to a double and returns the natural logarithm of the value. | 217 * Converts [x] to a double and returns the natural logarithm of the value. |
224 * Returns negative infinity if [x] is equal to zero. | 218 * Returns negative infinity if [x] is equal to zero. |
225 * Returns NaN if [x] is NaN or less than zero. | 219 * Returns NaN if [x] is NaN or less than zero. |
226 */ | 220 */ |
227 external double log(num x); | 221 external double log(num x); |
OLD | NEW |