14 lines
249 B
Rust
14 lines
249 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
|
|
pub struct CanvasPoint {
|
|
pub x: f64,
|
|
pub y: f64,
|
|
}
|
|
|
|
impl CanvasPoint {
|
|
pub fn new(x: f64, y: f64) -> Self {
|
|
CanvasPoint { x, y }
|
|
}
|
|
}
|