Example #1
0
        public override double GetDistanceTo(LocalizableEntity <int> otherEntity)
        {
            if (otherEntity is StopTimeInfo stopTimeInfo)
            {
                return(StopDto.GetDistanceTo(stopTimeInfo.StopDto));
            }

            return(double.MaxValue);
        }
Example #2
0
        public int GetDistanceTo(StopDto destination)
        {
            if (destination == null)
            {
                return(int.MaxValue);
            }

            if (destination == this)
            {
                return(0);
            }

            return(GetDistanceTo(destination.Latitude, destination.Longitude));
        }
Example #3
0
 public override double GetDistanceTo(double latitude, double longitude)
 {
     return(StopDto.GetDistanceTo(latitude, longitude));
 }