master
go 11 lines 192 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 package metrix
4
5 import "math"
6
7 func mustFiniteSample(v SampleValue) {
8 if math.IsNaN(v) || math.IsInf(v, 0) {
9 panic(errInvalidSampleValue)
10 }
11 }