Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions solutions/csharp/ridesharingservice/Models/Location.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
class Location
class Location(double latitude, double longitude)
{
private readonly double latitude;
private readonly double longitude;

public Location(double lat, double lng)
{
latitude = lat;
longitude = lng;
}

public double DistanceTo(Location other)
{
double dx = latitude - other.latitude;
Expand All @@ -23,4 +14,4 @@ public override string ToString()
{
return $"Location({latitude}, {longitude})";
}
}
}