Remove not required constants from linechart minMax wrapper

Signed-off-by: Xabier Larrakoetxea <slok69@gmail.com>
This commit is contained in:
Xabier Larrakoetxea 2019-04-18 20:33:53 +02:00
parent 2ae5ca1dcb
commit 53abc10da3
No known key found for this signature in database
GPG Key ID: FDAD7FD8275E1B32
1 changed files with 2 additions and 7 deletions

View File

@ -532,21 +532,16 @@ func (lc *LineChart) maxXValue() int {
return maxLen - 1
}
const (
defMin = 0
defMax = 0
)
// minMax is a wrapper around numbers.MinMax that controls
// the output if the values are NaN and sets defaults if it's
// the case.
func minMax(values []float64) (x, y float64) {
min, max := numbers.MinMax(values)
if math.IsNaN(min) {
min = defMin
min = 0
}
if math.IsNaN(max) {
max = defMax
max = 0
}
return min, max
}