// FloatEquals compares two floats using the MinFloatDelta difference to consider them
// Equals or not.
346705
func FloatEquals(a float64, b float64) bool {
	return math.Abs(a-b) < MinFloatDelta
}
557075
func ColorEqual(a, b Color) bool {
	return a.Hue == b.Hue &&
		a.Saturation == b.Saturation &&
		a.Brightness == b.Brightness &&
		a.Kelvin == b.Kelvin
}
779736
func (v *LargeDeltas) Equals(rhs *LargeDeltas) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !((v.B1 == nil && rhs.B1 == nil) || (v.B1 != nil && rhs.B1 != nil && v.B1.Equals(rhs.B1))) {
		return false
	}
	if !((v.B10 == nil && rhs.B10 == nil) || (v.B10 != nil && rhs.B10 != nil && v.B10.Equals(rhs.B10))) {
		return false
	}
	if !((v.B100 == nil && rhs.B100 == nil) || (v.B100 != nil && rhs.B100 != nil && v.B100.Equals(rhs.B100))) {
		return false
	}
	if !_Bool_EqualsPtr(v.CheckTrue, rhs.CheckTrue) {
		return false
	}
	if !((v.B1000 == nil && rhs.B1000 == nil) || (v.B1000 != nil && rhs.B1000 != nil && v.B1000.Equals(rhs.B1000))) {
		return false
	}
	if !_Bool_EqualsPtr(v.CheckFalse, rhs.CheckFalse) {
		return false
	}
	if !((v.Vertwo2000 == nil && rhs.Vertwo2000 == nil) || (v.Vertwo2000 != nil && rhs.Vertwo2000 != nil && v.Vertwo2000.Equals(rhs.Vertwo2000))) {
		return false
	}
	if !((v.ASet2500 == nil && rhs.ASet2500 == nil) || (v.ASet2500 != nil && rhs.ASet2500 != nil && _Set_String_Equals(v.ASet2500, rhs.ASet2500))) {
		return false
	}
	if !((v.Vertwo3000 == nil && rhs.Vertwo3000 == nil) || (v.Vertwo3000 != nil && rhs.Vertwo3000 != nil && v.Vertwo3000.Equals(rhs.Vertwo3000))) {
		return false
	}
	if !((v.BigNumbers == nil && rhs.BigNumbers == nil) || (v.BigNumbers != nil && rhs.BigNumbers != nil && _List_I32_Equals(v.BigNumbers, rhs.BigNumbers))) {
		return false
	}

	return true
}
1216069
func ResultsEqual(r1, r2 []Result) bool {
	if len(r1) != len(r2) {
		return false
	}
	for i, r := range r1 {
		if !r.Equal(&r2[i]) {
			return false
		}
	}
	return true
}
620531
func Float64s(input []float64) []float64 {
	u := make([]float64, 0, len(input))
	m := make(map[float64]bool)

	for _, val := range input {
		if _, ok := m[val]; !ok {
			m[val] = true
			u = append(u, val)
		}
	}

	return u
}
839307
func FloatEqualFunc(epsilon float64) func(float64, float64) bool {
	return func(a, b float64) bool {
		return FloatEqualThreshold(a, b, epsilon)
	}
}
695172
func (v1 Vec3) ApproxEqual(v2 Vec3) bool {
	for i := range v1 {
		if !FloatEqual(v1[i], v2[i]) {
			return false
		}
	}
	return true
}
1300758
func typeEqual(t1, t2 tomlType) bool {
	if t1 == nil || t2 == nil {
		return false
	}
	return t1.typeString() == t2.typeString()
}
761440
func compareFloat64PrecisionLoss(x, y float64) int {
	if x-y < floatEpsilon && y-x < floatEpsilon {
		return 0
	} else if x-y < 0 {
		return -1
	}
	return 1
}
1248193
func RankingEqual(o1, o2 *RankingOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
99010
func (f Float) Equal(other Argument) bool {
	if other.Typetag() != TypetagFloat {
		return false
	}
	f2 := other.(Float)
	return f == f2
}
1369869
func (k *Key) ValidFloat64s(delim string) []float64 {
	vals, _ := k.parseFloat64s(k.Strings(delim), false, false)
	return vals
}
760023
func (m1 Mat4x2) ApproxEqual(m2 Mat4x2) bool {
	for i := range m1 {
		if !FloatEqual(m1[i], m2[i]) {
			return false
		}
	}
	return true
}
792650
func (e *Endpoints) DeepEquals(o *Endpoints) bool {
	switch {
	case (e == nil) != (o == nil):
		return false
	case (e == nil) && (o == nil):
		return true
	}

	if len(e.Backends) != len(o.Backends) {
		return false
	}

	for ip1, ports1 := range e.Backends {
		ports2, ok := o.Backends[ip1]
		if !ok {
			return false
		}

		if !ports1.DeepEquals(ports2) {
			return false
		}
	}

	return true
}
593625
func areEqual(a, b interface{}) bool {
	if isNil(a) || isNil(b) {
		if isNil(a) && !isNil(b) {
			return false
		}
		if !isNil(a) && isNil(b) {
			return false
		}
		return true
	}
	if reflect.DeepEqual(a, b) {
		return true
	}
	aValue := reflect.ValueOf(a)
	bValue := reflect.ValueOf(b)
	return aValue == bValue
}
680887
func RowsEqual(left, right []sqltypes.Value) int {
	for i, l := range left {
		if !bytes.Equal(l.Raw(), right[i].Raw()) {
			return i
		}
	}
	return -1
}
1070578
func Float64s(data []float64) []float64 {
	sort.Float64s(data)
	n := Uniq(sort.Float64Slice(data))
	return data[:n]
}