From 70e2dfed16da8d5130460ea15b47701e622f4a9f Mon Sep 17 00:00:00 2001 From: mat Date: Thu, 8 Dec 2022 18:39:35 -0600 Subject: wrap_comments = true --- azalea/src/pathfinder/moves.rs | 3 ++- azalea/src/pathfinder/mtdstarlite.rs | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'azalea/src/pathfinder') diff --git a/azalea/src/pathfinder/moves.rs b/azalea/src/pathfinder/moves.rs index 63e24412..ac2137d3 100644 --- a/azalea/src/pathfinder/moves.rs +++ b/azalea/src/pathfinder/moves.rs @@ -38,7 +38,8 @@ const WALK_ONE_BLOCK_COST: f32 = 1.0; pub trait Move { fn cost(&self, world: &World, node: &Node) -> f32; - /// Returns by how much the entity's position should be changed when this move is executed. + /// Returns by how much the entity's position should be changed when this + /// move is executed. fn offset(&self) -> BlockPos; fn next_node(&self, node: &Node) -> Node { Node { diff --git a/azalea/src/pathfinder/mtdstarlite.rs b/azalea/src/pathfinder/mtdstarlite.rs index ff0fe4cc..50a467df 100644 --- a/azalea/src/pathfinder/mtdstarlite.rs +++ b/azalea/src/pathfinder/mtdstarlite.rs @@ -20,7 +20,8 @@ pub struct MTDStarLite< PredecessorsFn: Fn(&N) -> Vec>, SuccessFn: Fn(&N) -> bool, > { - /// Returns a rough estimate of how close we are to the goal. Lower = closer. + /// Returns a rough estimate of how close we are to the goal. Lower = + /// closer. pub heuristic: HeuristicFn, /// Returns the nodes that can be reached from the given node. pub successors: SuccessorsFn, @@ -29,7 +30,8 @@ pub struct MTDStarLite< /// can be the same as `successors`. pub predecessors: PredecessorsFn, /// Returns true if the given node is at the goal. - /// A simple implementation is to check if the given node is equal to the goal. + /// A simple implementation is to check if the given node is equal to the + /// goal. pub success: SuccessFn, start: N, @@ -43,7 +45,8 @@ pub struct MTDStarLite< node_states: HashMap>, updated_edge_costs: Vec>, - /// This only exists so it can be referenced by `state()` when there's no state. + /// This only exists so it can be referenced by `state()` when there's no + /// state. default_state: NodeState, } -- cgit v1.2.3