ToString() adjustment
This commit is contained in:
parent
2d5ffabb5d
commit
556d4b1ffb
@ -47,6 +47,6 @@ public class Coordinates
|
|||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return
|
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()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
if(this.previousPathNode != null)
|
if(previousPathNode is not null)
|
||||||
return string.Format(
|
return $"{nodeId} {coordinates} {edges.Count} {directDistanceToGoal} {currentPathWeight} {currentPathLength} {previousPathNode.nodeId}";
|
||||||
"NODE {0} Edges-Count: {1} previousPathNode: {2} currentPathWeight: {3} currentPathLength: {4} directDistanceToGoal: {5}",
|
return
|
||||||
this.coordinates.ToString(), this.edges.Count, this.previousPathNode.coordinates.ToString(),
|
$"{nodeId} {coordinates} ec:{edges.Count} d:{directDistanceToGoal} w:{currentPathWeight} l:{currentPathLength} null";
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user