| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 app; | 5 part of app; |
| 6 | 6 |
| 7 class Utils { | 7 class Utils { |
| 8 static String formatPercent(num a, num total) { | 8 static String formatPercent(num a, num total) { |
| 9 var percent = 100.0 * (a / total); | 9 var percent = 100.0 * (a / total); |
| 10 return '${percent.toStringAsFixed(2)}%'; | 10 return '${percent.toStringAsFixed(2)}%'; |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 } | 119 } |
| 120 return '${seconds}s'; | 120 return '${seconds}s'; |
| 121 } | 121 } |
| 122 | 122 |
| 123 static String formatSeconds(double x) { | 123 static String formatSeconds(double x) { |
| 124 return x.toStringAsFixed(2); | 124 return x.toStringAsFixed(2); |
| 125 } | 125 } |
| 126 | 126 |
| 127 static bool runningInJavaScript() => identical(1.0, 1); | 127 static bool runningInJavaScript() => identical(1.0, 1); |
| 128 } | 128 } |
| OLD | NEW |