Exemplo n.º 1
0
        public override bool Equals(Object obj) // contains calls this here
        {
            if (obj == null)
            {
                return(false);
            }

            PokemonLocation p = obj as PokemonLocation;

            if ((System.Object)p == null) // no cast available
            {
                return(false);
            }

            return(Math.Abs(latitude - p.latitude) < 0.0001 && Math.Abs(longitude - p.longitude) < 0.0001);
        }
Exemplo n.º 2
0
 public bool Equals(PokemonLocation obj)
 {
     return Math.Abs(Latitude - obj.Latitude) < 0.0001 && Math.Abs(Longitude - obj.Longitude) < 0.0001;
 }
 public bool Equals(PokemonLocation obj)
 {
     return(Math.Abs(latitude - obj.latitude) < 0.0001 && Math.Abs(longitude - obj.longitude) < 0.0001);
 }