tests for some things that came up as regressions when building out examples.
This commit is contained in:
parent
230dd16308
commit
6d48c49c07
3 changed files with 104 additions and 3 deletions
4
range.go
4
range.go
|
|
@ -14,7 +14,9 @@ type Range struct {
|
|||
|
||||
// IsZero returns if the range has been set or not.
|
||||
func (r Range) IsZero() bool {
|
||||
return r.Min == 0 && r.Max == 0 && r.Domain == 0
|
||||
return (r.Min == 0 || math.IsNaN(r.Min)) &&
|
||||
(r.Max == 0 || math.IsNaN(r.Max)) &&
|
||||
r.Domain == 0
|
||||
}
|
||||
|
||||
// Delta returns the difference between the min and max value.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue