Equal returns true if the value of v and o is equal or if both are NaN. Note that v==o is false if both are NaN. If you want the conventional float behavior, use == to compare two SampleValues.
(o SampleValue)
| 53 | // that v==o is false if both are NaN. If you want the conventional float |
| 54 | // behavior, use == to compare two SampleValues. |
| 55 | func (v SampleValue) Equal(o SampleValue) bool { |
| 56 | if v == o { |
| 57 | return true |
| 58 | } |
| 59 | return math.IsNaN(float64(v)) && math.IsNaN(float64(o)) |
| 60 | } |
| 61 | |
| 62 | func (v SampleValue) String() string { |
| 63 | return strconv.FormatFloat(float64(v), 'f', -1, 64) |
nothing calls this directly
no outgoing calls
no test coverage detected