| 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 /** | 5 /** |
| 6 * Mathematical constants and functions, plus a random number generator. | 6 * Mathematical constants and functions, plus a random number generator. |
| 7 */ | 7 */ |
| 8 library dart.math; | 8 library dart.math; |
| 9 | 9 |
| 10 part "jenkins_smi_hash.dart"; | 10 part "jenkins_smi_hash.dart"; |
| 11 part "point.dart"; | 11 part "point.dart"; |
| 12 part "random.dart"; | 12 part "random.dart"; |
| 13 part "rectangle.dart"; | 13 part "rectangle.dart"; |
| 14 import 'dart:_foreign_helper' show JS; |
| 15 import 'dart:_js_helper' show patch, checkNum; |
| 14 | 16 |
| 15 /** | 17 /** |
| 16 * Base of the natural logarithms. | 18 * Base of the natural logarithms. |
| 17 * | 19 * |
| 18 * Typically written as "e". | 20 * Typically written as "e". |
| 19 */ | 21 */ |
| 20 const double E = 2.718281828459045; | 22 const double E = 2.718281828459045; |
| 21 | 23 |
| 22 /** | 24 /** |
| 23 * Natural logarithm of 10. | 25 * Natural logarithm of 10. |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 432 _nextState(); | 434 _nextState(); |
| 433 int bits27 = _lo & ((1 << 27) - 1); | 435 int bits27 = _lo & ((1 << 27) - 1); |
| 434 return (bits26 * _POW2_27_D + bits27) / _POW2_53_D; | 436 return (bits26 * _POW2_27_D + bits27) / _POW2_53_D; |
| 435 } | 437 } |
| 436 | 438 |
| 437 bool nextBool() { | 439 bool nextBool() { |
| 438 _nextState(); | 440 _nextState(); |
| 439 return (_lo & 1) == 0; | 441 return (_lo & 1) == 0; |
| 440 } | 442 } |
| 441 } | 443 } |
| OLD | NEW |