removing example

This commit is contained in:
Will Charczuk 2018-09-10 13:14:46 -07:00
parent a7ff82d63f
commit 872b97b99f
5 changed files with 34 additions and 103 deletions

View file

@ -2,7 +2,6 @@ package util
import (
"math"
"time"
)
const (
@ -58,27 +57,6 @@ func (m mathUtil) MinAndMax(values ...float64) (min float64, max float64) {
return
}
// MinAndMaxOfTime returns the min and max of a given set of times
// in one pass.
func (m mathUtil) MinAndMaxOfTime(values ...time.Time) (min time.Time, max time.Time) {
if len(values) == 0 {
return
}
min = values[0]
max = values[0]
for _, v := range values[1:] {
if max.Before(v) {
max = v
}
if min.After(v) {
min = v
}
}
return
}
// GetRoundToForDelta returns a `roundTo` value for a given delta.
func (m mathUtil) GetRoundToForDelta(delta float64) float64 {
startingDeltaBound := math.Pow(10.0, 10.0)