Skip to content

Commit

Permalink
fix: cost application
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0539 committed Nov 3, 2024
1 parent 7621d19 commit 90178ad
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -582,15 +582,15 @@ impl<'m> SearchInstance<'m> {
}
#[cfg(feature = "detailed-layers")]
{
let start_layer = &self.mesh.layers[start.1.layer() as usize];
let end_layer = &self.mesh.layers[end.1.layer() as usize];
heuristic_to_end = heuristic(
root,
self.to,
(start.0 * start_layer.scale, end.0 * end_layer.scale),
);
(
start.0 * self.mesh.layers[start.1.layer() as usize].scale,
end.0 * self.mesh.layers[end.1.layer() as usize].scale,
),
) * self.min_layer_cost;
}
heuristic_to_end *= self.min_layer_cost;
if new_f.is_nan() || heuristic_to_end.is_nan() {
#[cfg(debug_assertions)]
if self.debug {
Expand Down

0 comments on commit 90178ad

Please sign in to comment.