minor: no need for explicit type cast
const type is inferred
Vladimir Bauer
2 years ago
| 85 | 85 |
var str string
|
| 86 | 86 |
// ewma implementation may return 0 before accumulating certain number of samples
|
| 87 | 87 |
if v := d.average.Value(); v != 0 {
|
| 88 | |
str = d.producer(float64(1e9) / v)
|
|
88 |
str = d.producer(1e9 / v)
|
| 89 | 89 |
} else {
|
| 90 | 90 |
str = d.producer(0)
|
| 91 | 91 |
}
|