ToString() adjustment
This commit is contained in:
parent
2d5ffabb5d
commit
556d4b1ffb
@ -47,6 +47,6 @@ public class Coordinates
|
||||
public override string ToString()
|
||||
{
|
||||
return
|
||||
$"COORDINATES Lat: {this.latitude.ToString(NumberFormatInfo.InvariantInfo)} Lon: {this.longitude.ToString(CultureInfo.InvariantCulture)}";
|
||||
$"lat:{latitude.ToString(NumberFormatInfo.InvariantInfo)} lon:{longitude.ToString(CultureInfo.InvariantCulture)}";
|
||||
}
|
||||
}
|
@ -46,15 +46,9 @@ public class OsmNode
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
if(this.previousPathNode != null)
|
||||
return string.Format(
|
||||
"NODE {0} Edges-Count: {1} previousPathNode: {2} currentPathWeight: {3} currentPathLength: {4} directDistanceToGoal: {5}",
|
||||
this.coordinates.ToString(), this.edges.Count, this.previousPathNode.coordinates.ToString(),
|
||||
this.currentPathWeight, this.currentPathLength, this.directDistanceToGoal);
|
||||
else
|
||||
return string.Format(
|
||||
"NODE {0} Edges-Count: {1} previousPathNode: NO PREVIOUS NODE currentPathWeight: {2} currentPathLength: {3} directDistanceToGoal: {4}",
|
||||
this.coordinates.ToString(), this.edges.Count,
|
||||
this.currentPathWeight, this.currentPathLength, this.directDistanceToGoal);
|
||||
if(previousPathNode is not null)
|
||||
return $"{nodeId} {coordinates} {edges.Count} {directDistanceToGoal} {currentPathWeight} {currentPathLength} {previousPathNode.nodeId}";
|
||||
return
|
||||
$"{nodeId} {coordinates} ec:{edges.Count} d:{directDistanceToGoal} w:{currentPathWeight} l:{currentPathLength} null";
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user