aboutsummaryrefslogtreecommitdiff
path: root/src/math
diff options
context:
space:
mode:
Diffstat (limited to 'src/math')
-rw-r--r--src/math/polygon/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/math/polygon/mod.rs b/src/math/polygon/mod.rs
index cc89169..cda1f2a 100644
--- a/src/math/polygon/mod.rs
+++ b/src/math/polygon/mod.rs
@@ -10,9 +10,10 @@ use super::{LineSegment, Surface, TripletOrientation, Vec2};
use crate::math;
use nalgebra::{ClosedDiv, ClosedMul, ClosedSub, RealField, Scalar};
use num_traits::Zero;
+use serde::{Deserialize, Serialize};
use std::ops::Neg;
-#[derive(Debug)]
+#[derive(Debug, Deserialize, Serialize)]
// TODO: Support polygons with holes
pub struct Polygon<T: Scalar + Copy> {
pub corners: Vec<Vec2<T>>,