File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -6,18 +6,18 @@ $(function() {
66 }
77 running = true ;
88
9- var graph = new Graph ( grid ) ;
10- var start = graph . grid [ 0 ] [ 0 ] ;
11- var end = graph . grid [ 140 ] [ 140 ] ;
12- var results = [ ] ;
13- var times = 0 ;
14-
9+ var graph = new Graph ( grid ) ,
10+ start = graph . grid [ 0 ] [ 0 ] ,
11+ end = graph . grid [ 140 ] [ 140 ] ,
12+ results = [ ] ,
13+ times = 0 ;
14+
1515 for ( var i = 0 ; i < 1000 ; i ++ ) {
16- var startTime = performance ? performance . now ( ) : new Date ( ) . getTime ( ) ;
17- var result = astar . search ( graph , start , end ) ;
18- var endTime = performance ? performance . now ( ) : new Date ( ) . getTime ( ) ;
16+ var startTime = performance ? performance . now ( ) : new Date ( ) . getTime ( ) ,
17+ result = astar . search ( graph , start , end ) ,
18+ endTime = performance ? performance . now ( ) : new Date ( ) . getTime ( ) ;
1919 times = times + ( endTime - startTime ) ;
20-
20+
2121 results . push (
2222 '<li>Found path with ' + result . length + ' steps. ' +
2323 'Took ' + ( endTime - startTime ) . toFixed ( 2 ) + ' milliseconds.</li>'
You can’t perform that action at this time.
0 commit comments