b2Math.h This function is used to ensure that a floating point number is not a NaN or infinity.
(x float64)
| 14 | |
| 15 | /// This function is used to ensure that a floating point number is not a NaN or infinity. |
| 16 | func B2IsValid(x float64) bool { |
| 17 | return !math.IsNaN(x) && !math.IsInf(x, 0) |
| 18 | } |
| 19 | |
| 20 | /// This is a approximate yet fast inverse square-root. |
| 21 | func B2InvSqrt(x float64) float64 { |
no outgoing calls
no test coverage detected