goext/mathext/float.go

8 lines
131 B
Go
Raw Normal View History

2022-10-27 16:00:57 +02:00
package mathext
import "math"
func Float64EpsilonEq(v1 float64, v2 float64, eps float64) bool {
return math.Abs(v1-v2) <= eps
}