24 lines
433 B
Go
24 lines
433 B
Go
package geom
|
|
|
|
import "math"
|
|
|
|
// IsNaN checks if the floating point number is not a number.
|
|
func IsNaN(f float64) bool {
|
|
return f != f
|
|
}
|
|
|
|
// IsNaN32 checks if the floating point number is not a number.
|
|
func IsNaN32(f float32) bool {
|
|
return f != f
|
|
}
|
|
|
|
// NaN returns not a floating point number.
|
|
func NaN() float64 {
|
|
return math.NaN()
|
|
}
|
|
|
|
// NaN32 returns not a floating point number.
|
|
func NaN32() float32 {
|
|
return float32(NaN())
|
|
}
|