chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71c6a33
)
provide Area type
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 31 Jan 2021 23:09:24 +0000
(23:09 +0000)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 12 Feb 2021 01:30:07 +0000
(
01:30
+0000)
We are going to want this for occultations. This doesn't really do
anything yet.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/spec.rs
patch
|
blob
|
history
diff --git
a/src/spec.rs
b/src/spec.rs
index a0939407a3a4a13b9bfe67831bacad8730366a39..d71dc1220b841bdc98f2127ad9a124db25add1ea 100644
(file)
--- a/
src/spec.rs
+++ b/
src/spec.rs
@@
-33,6
+33,11
@@
pub type Coord = i32;
pub struct PosC<T>(pub [T; 2]);
pub type Pos = PosC<Coord>;
+#[derive(Clone,Copy,Debug,Serialize,Deserialize,Hash)]
+#[serde(transparent)]
+pub struct AreaC<T>(pub [PosC<T>; 2]);
+pub type Area = AreaC<Coord>;
+
#[derive(Clone,Eq,PartialEq,Ord,PartialOrd,Hash,Serialize,Deserialize)]
#[serde(transparent)]
pub struct RawToken(pub String);