Exemplo n.º 1
0
 public static double Distance(Position left, Position right)
 {
     var diff = new Position()
     {
         X = left.X - right.X,
         Y = left.Y = right.Y
     };
     return DotProduct(diff, diff);
 }
Exemplo n.º 2
0
 public static double DotProduct(Position left, Position right)
 {
     return Math.Sqrt(left.X * right.X + left.Y * right.Y);
 }
Exemplo n.º 3
0
 private Task<IEnumerable<Discount>> GetDiscounts(Position currentLocation)
 {
     //Sends request to the server and recieves the collection of discounts
     return Task.FromResult(Enumerable.Empty<Discount>());
 }