2019-03-29 15:16:39 +00:00
|
|
|
package utils
|
|
|
|
|
|
|
|
import "math"
|
|
|
|
|
|
|
|
// IsValidFloat64 ensures the given value is a valid number (not NaN) which is not equal to 0
|
|
|
|
func IsValidFloat64(value float64) bool {
|
|
|
|
return !math.IsNaN(value) && value != 0
|
2019-04-11 17:55:58 +00:00
|
|
|
}
|