snapshot
This commit is contained in:
parent
3cb33d48d3
commit
26eaa1d898
76 changed files with 1076 additions and 1717 deletions
|
|
@ -2,8 +2,6 @@ package chart
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
util "github.com/wcharczuk/go-chart/util"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -96,7 +94,7 @@ func (sma SMASeries) GetLastValues() (x, y float64) {
|
|||
|
||||
func (sma SMASeries) getAverage(index int) float64 {
|
||||
period := sma.GetPeriod()
|
||||
floor := util.Math.MaxInt(0, index-period)
|
||||
floor := MaxInt(0, index-period)
|
||||
var accum float64
|
||||
var count float64
|
||||
for x := index; x >= floor; x-- {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue