this is just not possible
This commit is contained in:
parent
ba5c8ffaa6
commit
93217a3ae3
@ -143,9 +143,6 @@ public final class AStarPathFinder extends AbstractNodeCostSearch implements Hel
|
|||||||
PathNode neighbor = getNodeAtPosition(res.x, res.y, res.z, hashCode);
|
PathNode neighbor = getNodeAtPosition(res.x, res.y, res.z, hashCode);
|
||||||
double tentativeCost = currentNode.cost + actionCost;
|
double tentativeCost = currentNode.cost + actionCost;
|
||||||
if (tentativeCost < neighbor.cost) {
|
if (tentativeCost < neighbor.cost) {
|
||||||
if (tentativeCost < 0) {
|
|
||||||
throw new IllegalStateException(moves + " overflowed into negative " + actionCost + " " + neighbor.cost + " " + tentativeCost);
|
|
||||||
}
|
|
||||||
double improvementBy = neighbor.cost - tentativeCost;
|
double improvementBy = neighbor.cost - tentativeCost;
|
||||||
// there are floating point errors caused by random combinations of traverse and diagonal over a flat area
|
// there are floating point errors caused by random combinations of traverse and diagonal over a flat area
|
||||||
// that means that sometimes there's a cost improvement of like 10 ^ -16
|
// that means that sometimes there's a cost improvement of like 10 ^ -16
|
||||||
|
Loading…
Reference in New Issue
Block a user