adding lastvalueprovider interface and relevant methods.

This commit is contained in:
Will Charczuk 2016-07-18 12:57:10 -07:00
parent c14ab6a4b2
commit 2603c67e10
5 changed files with 27 additions and 5 deletions

View file

@ -52,7 +52,7 @@ func (ema EMASeries) GetSigma() float64 {
}
// GetValue gets a value at a given index.
func (ema EMASeries) GetValue(index int) (x float64, y float64) {
func (ema EMASeries) GetValue(index int) (x, y float64) {
if ema.InnerSeries == nil {
return
}
@ -64,7 +64,7 @@ func (ema EMASeries) GetValue(index int) (x float64, y float64) {
// GetLastValue computes the last moving average value but walking back window size samples,
// and recomputing the last moving average chunk.
func (ema EMASeries) GetLastValue() (x float64, y float64) {
func (ema EMASeries) GetLastValue() (x, y float64) {
if ema.InnerSeries == nil {
return
}