MCPcopy Create free account
hub / github.com/algoscienceacademy/RustUI / distance

Method distance

src/geometry/mod.rs:12–16  ·  view source on GitHub ↗
(&self, other: &Point)

Source from the content-addressed store, hash-verified

10 }
11
12 pub fn distance(&self, other: &Point) -> f32 {
13 let dx = self.x - other.x;
14 let dy = self.y - other.y;
15 (dx * dx + dy * dy).sqrt()
16 }
17}
18
19#[derive(Clone, Debug, Default)]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected