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

Method new

src/geometry/mod.rs:8–10  ·  view source on GitHub ↗
(x: f32, y: f32)

Source from the content-addressed store, hash-verified

6
7impl Point {
8 pub fn new(x: f32, y: f32) -> Self {
9 Self { x, y }
10 }
11
12 pub fn distance(&self, other: &Point) -> f32 {
13 let dx = self.x - other.x;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected