MCPcopy Index your code
hub / github.com/gonum/plot / Range

Function Range

plotter/plotter.go:55–64  ·  view source on GitHub ↗

Range returns the minimum and maximum values.

(vs Valuer)

Source from the content-addressed store, hash-verified

53
54// Range returns the minimum and maximum values.
55func Range(vs Valuer) (min, max float64) {
56 min = math.Inf(1)
57 max = math.Inf(-1)
58 for i := range vs.Len() {
59 v := vs.Value(i)
60 min = math.Min(min, v)
61 max = math.Max(max, v)
62 }
63 return
64}
65
66// Values implements the Valuer interface.
67type Values []float64

Callers 5

DataRangeMethod · 0.85
binPointsFunction · 0.85
DataRangeMethod · 0.85
DataRangeMethod · 0.85
XYRangeFunction · 0.85

Calls 4

LenMethod · 0.65
ValueMethod · 0.65
MinMethod · 0.65
MaxMethod · 0.65

Tested by

no test coverage detected