mirror of
https://github.com/stashapp/stash.git
synced 2025-12-07 00:43:12 +01:00
8 lines
No EOL
208 B
Go
8 lines
No EOL
208 B
Go
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
|
|
} |