// EqualTo returns true if the coordinates point to the same geographical location.
967570
func (p Point) EqualTo(other Point) bool {
	var (
		dlat = p.Latitude - other.Latitude
		dlng = p.Longitude - other.Longitude
	)

	for dlat < -180.0 {
		dlat += 360.0
	}
	for dlat > 180.0 {
		dlat -= 360.0
	}
	for dlng < -90.0 {
		dlng += 90.0
	}
	for dlng > 90.0 {
		dlng -= 90.0
	}

	return dlat == 0.0 && dlng == 0.0
}
455392
func (a *Region) Equal(b *Region) bool {
	ret := C.cairo_region_equal(a.Ptr, b.Ptr) != 0
	if err := a.status(); err != nil {
		panic(err)
	}
	return ret
}
612580
func (p Polygon) Equal(polygon Polygon) bool {
	if len(p) != len(polygon) {
		return false
	}

	for i := range p {
		if !p[i].Equal(polygon[i]) {
			return false
		}
	}

	return true
}
576865
func (o *AroundPrecisionOption) Equal(o2 *AroundPrecisionOption) bool {
	if o2 == nil {
		return o.value == 1
	}
	return o.value == o2.value
}
330036
func (o *Origin) Equal(b Origin) bool {
	if o.Username != b.Username {
		return false
	}
	if o.SessionID != b.SessionID {
		return false
	}
	if o.SessionVersion != b.SessionVersion {
		return false
	}
	if o.NetworkType != b.NetworkType {
		return false
	}
	if o.AddressType != b.AddressType {
		return false
	}
	if o.Address != b.Address {
		return false
	}
	return true
}
896971
func (o *ValidUntilOption) Equal(o2 *ValidUntilOption) bool {
	if o2 == nil {
		return o.value.IsZero()
	}
	return o.value.Equal(o2.value)
}
1040647
func Equal(x, y Value) (bool, error) {
	if x, ok := x.(String); ok {
		return x == y, nil // fast path for an important special case
	}
	return EqualDepth(x, y, maxdepth)
}
700504
func (dt *DateTime) Equal(value time.Time) *DateTime {
	if !dt.value.Equal(value) {
		dt.chain.fail("\nexpected datetime equal to:\n %s\n\nbut got:\n %s",
			value, dt.value)
	}
	return dt
}
1145867
func (k *Key) EqualsTo(other *Key) bool {
	if k == other {
		return true
	}
	return bytes.Equal(k.Cert, other.Cert) &&
		bytes.Equal(k.Priv, other.Priv) &&
		bytes.Equal(k.Pub, other.Pub) &&
		bytes.Equal(k.TLSCert, other.TLSCert)
}
306943
func (a *TickLaterAction) Equal(o *TickLaterAction) bool {
	return a.TickNonce == o.TickNonce && a.When.Equal(o.When)
}
368293
func (t SimpleType) EqualValue(u convert.Equaler) bool {
	return t.Equal(u)
}
715201
func (o *IndexNameOption) Equal(o2 *IndexNameOption) bool {
	if o2 == nil {
		return o.value == ""
	}
	return o.value == o2.value
}
1112465
func (o *AllowTyposOnNumericTokensOption) Equal(o2 *AllowTyposOnNumericTokensOption) bool {
	if o2 == nil {
		return o.value == true
	}
	return o.value == o2.value
}
794067
func equalMapValues(a, e reflect.Value) bool {
	if a.IsNil() != e.IsNil() {
		return false
	}
	if a.IsNil() && e.IsNil() {
		return true
	}
	if a.Len() != e.Len() {
		return false
	}
	for _, k := range a.MapKeys() {
		valA := a.MapIndex(k)
		valE := e.MapIndex(k)

		glog.V(10).Infof("comparing maps: %v %v %v", k, valA, valE)

		if !equalFieldValues(valA, valE) {
			glog.V(4).Infof("unequal map value: %v %v %v", k, valA, valE)
			return false
		}
	}
	return true
}
1077428
func (t *TransportPort) Equal(o *TransportPort) bool {
	if t == o {
		return true
	}

	if o == nil {
		return false
	}

	if t.Proto != o.Proto || t.Port != o.Port {
		return false
	}

	return true
}
478779
func (o *PaginationLimitedToOption) Equal(o2 *PaginationLimitedToOption) bool {
	if o2 == nil {
		return o.value == 1000
	}
	return o.value == o2.value
}
1274687
func (o *PercentileComputationOption) Equal(o2 *PercentileComputationOption) bool {
	if o2 == nil {
		return o.value == true
	}
	return o.value == o2.value
}