qiao/PathFinding.js — pull request #70 by surrim (2014-10-09 14:26:42+00:00)
Title: Octile heuristic

I added octile heuristics and make use of it. This heuristic needs sqrt() only for a constant value and looks very close to euclidean distance. When using a non accessible target next to the source with a large grid, you can see something like a octagon instead of a circle. This heuristic is ideal when you can only do straight and diagonal steps.
This second commit fixes a minor JPS bug. When you find a jump point successor, the distance is the diagonal distance plus the remaining straight distance, not the air-line/euclidean distance. When the euclidean distance was used, you might pass obstacles instead of the original jump point way. So better use the octile heuristic here.