| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 class MathNatives { | 5 class MathNatives { |
| 6 static num pow(num value, num exponent) { | 6 static num pow(num value, num exponent) { |
| 7 if (exponent is int) { | 7 if (exponent is int) { |
| 8 return value.pow(exponent); | 8 return value.pow(exponent); |
| 9 } | 9 } |
| 10 // Double.pow will call exponent.toDouble(). | 10 // Double.pow will call exponent.toDouble(). |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 static double parseDouble(String str) => _parseDouble(str); | 25 static double parseDouble(String str) => _parseDouble(str); |
| 26 | 26 |
| 27 static double _random() native "MathNatives_random"; | 27 static double _random() native "MathNatives_random"; |
| 28 static double _sqrt(double value) native "MathNatives_sqrt"; | 28 static double _sqrt(double value) native "MathNatives_sqrt"; |
| 29 static double _sin(double value) native "MathNatives_sin"; | 29 static double _sin(double value) native "MathNatives_sin"; |
| 30 static double _cos(double value) native "MathNatives_cos"; | 30 static double _cos(double value) native "MathNatives_cos"; |
| 31 static double _tan(double value) native "MathNatives_tan"; | 31 static double _tan(double value) native "MathNatives_tan"; |
| 32 static double _acos(double value) native "MathNatives_acos"; | 32 static double _acos(double value) native "MathNatives_acos"; |
| 33 static double _asin(double value) native "MathNatives_asin"; | 33 static double _asin(double value) native "MathNatives_asin"; |
| 34 static double _atan(double value) native "MathNatives_atan"; | 34 static double _atan(double value) native "MathNatives_atan"; |
| 35 static double _atan2(double a, double b) native "MathNatives_2atan"; | 35 static double _atan2(double a, double b) native "MathNatives_atan2"; |
| 36 static double _exp(double value) native "MathNatives_exp"; | 36 static double _exp(double value) native "MathNatives_exp"; |
| 37 static double _log(double value) native "MathNatives_log"; | 37 static double _log(double value) native "MathNatives_log"; |
| 38 static int _parseInt(String str) native "MathNatives_parseInt"; | 38 static int _parseInt(String str) native "MathNatives_parseInt"; |
| 39 static double _parseDouble(String str) native "MathNatives_parseDouble"; | 39 static double _parseDouble(String str) native "MathNatives_parseDouble"; |
| 40 } | 40 } |
| OLD | NEW |