1#[derive(Debug, Clone, Copy, PartialEq)] 2pub struct Point { 3 pub x: f64, 4 pub y: f64, 5} 6 7impl Point { 8 pub fn new(x: f64, y: f64) -> Self { 9 Self { x, y } 10 } 11}