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