From: Ian Jackson Date: Sun, 31 Jan 2021 23:09:24 +0000 (+0000) Subject: provide Area type X-Git-Tag: otter-0.4.0~553 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=bff89fedb8690d14ed448e27b405d6d82eb1ce6f;p=otter.git provide Area type We are going to want this for occultations. This doesn't really do anything yet. Signed-off-by: Ian Jackson --- diff --git a/src/spec.rs b/src/spec.rs index a0939407..d71dc122 100644 --- a/src/spec.rs +++ b/src/spec.rs @@ -33,6 +33,11 @@ pub type Coord = i32; pub struct PosC(pub [T; 2]); pub type Pos = PosC; +#[derive(Clone,Copy,Debug,Serialize,Deserialize,Hash)] +#[serde(transparent)] +pub struct AreaC(pub [PosC; 2]); +pub type Area = AreaC; + #[derive(Clone,Eq,PartialEq,Ord,PartialOrd,Hash,Serialize,Deserialize)] #[serde(transparent)] pub struct RawToken(pub String);