func NewEwmaRate(halfLife time.Duration) *EwmaRate {
	return (&EwmaRate{}).Init(halfLife)
}
Allocate a new NewEwmaRate structure

halfLife it the time takes for a half charge or half discharge
package ewma
import (
	"time"
)
type EwmaRate struct {
	Ewma
}
const nanosec = float64(1000000000)