You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
310 B
Rust
24 lines
310 B
Rust
#[derive(Copy, Clone)]
|
|
pub struct Point {
|
|
pub x: f64,
|
|
pub y: f64,
|
|
}
|
|
|
|
#[derive(Copy, Clone)]
|
|
pub struct Circle {
|
|
pub center: Point,
|
|
pub radius: f64,
|
|
}
|
|
|
|
#[derive(Copy, Clone)]
|
|
pub struct Line {
|
|
pub p1: Point,
|
|
pub p2: Point,
|
|
}
|
|
|
|
pub enum Shape {
|
|
Point(Point),
|
|
Circle(Circle),
|
|
Line(Line),
|
|
}
|