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 part of common; | 5 part of common; |
6 | 6 |
7 // Various math-related utility functions. | 7 // Various math-related utility functions. |
8 | 8 |
9 class Math2 { | 9 class Math2 { |
10 /// Computes the geometric mean of a set of numbers. | 10 /// Computes the geometric mean of a set of numbers. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 if (precision > 0) { | 42 if (precision > 0) { |
43 end++; | 43 end++; |
44 } | 44 } |
45 if (end > dStr.length) { | 45 if (end > dStr.length) { |
46 end = dStr.length; | 46 end = dStr.length; |
47 } | 47 } |
48 | 48 |
49 return dStr.substring(0, end); | 49 return dStr.substring(0, end); |
50 } | 50 } |
51 } | 51 } |
OLD | NEW |