* @zh 计算路径总长度 * @en Calculate total path length
(path: readonly IPoint[])
| 566 | * @en Calculate total path length |
| 567 | */ |
| 568 | private calculatePathLength(path: readonly IPoint[]): number { |
| 569 | let length = 0; |
| 570 | |
| 571 | for (let i = 1; i < path.length; i++) { |
| 572 | length += euclideanDistance(path[i - 1], path[i]); |
| 573 | } |
| 574 | |
| 575 | return length; |
| 576 | } |
| 577 | |
| 578 | /** |
| 579 | * @zh 清空导航网格 |
no test coverage detected