Skip to content

Else if conditon in calcShortestPath always fails #3

Description

@GoogleCodeExporter
As "map.getDistanceBetween(current, neighbor)" gives a distance which is always 
positive,  
"neighborDistanceFromStart" is always greater than 
"current.getDistanceFromStart()"..

Thus
"else if(neighborDistanceFromStart < current.getDistanceFromStart()) 
{neighborIsBetter = true;}"
is never satisfied.

Possible solution:
Change Else if condition to 
"else if(neighborDistanceFromStart < neighbor.getDistanceFromStart()) 
{neighborIsBetter = true;}"

Original issue reported on code.google.com by itsprajw...@gmail.com on 13 Sep 2013 at 11:49

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions