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

Function CheckFloats

plotter/plotter.go:76–86  ·  view source on GitHub ↗

CheckFloats returns an error if any of the arguments are NaN or Infinity.

(fs ...float64)

Source from the content-addressed store, hash-verified

74
75// CheckFloats returns an error if any of the arguments are NaN or Infinity.
76func CheckFloats(fs ...float64) error {
77 for _, f := range fs {
78 switch {
79 case math.IsNaN(f):
80 return ErrNaN
81 case math.IsInf(f, 0):
82 return ErrInfinity
83 }
84 }
85 return nil
86}
87
88// CopyValues returns a Values that is a copy of the values
89// from a Valuer, or an error if there are no values, or if one of

Callers 6

NewErrorPointsFunction · 0.92
NewYErrorBarsFunction · 0.85
NewXErrorBarsFunction · 0.85
CopyValuesFunction · 0.85
CopyXYsFunction · 0.85
CopyXYZsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected