pub trait Coords {
// Required methods
fn get_x(&self) -> f32;
fn get_y(&self) -> f32;
}
Expand description
A trait to extract the coordinates of a node.
Required Methods§
Implementations on Foreign Types§
source§impl Coords for ()
impl Coords for ()
Implement the Coords trait for the unit type.
Since there’s no data 0. is returned
source§impl Coords for (f32, f32)
impl Coords for (f32, f32)
Implement the Coords trait for all tuples (f32, f32).
When a Graph has the generic N type bound to (f32, f32) we can call the various distance methods on the nodes.