src/cube.rs

changeset 56
34f8ec636368
parent 46
90cc221eb52b
equal deleted inserted replaced
55:15f01efc034b 56:34f8ec636368
4 4
5 use serde_repr::*; 5 use serde_repr::*;
6 use serde::Serialize; 6 use serde::Serialize;
7 use alg_tools::loc::Loc; 7 use alg_tools::loc::Loc;
8 use alg_tools::norms::{Norm, L2}; 8 use alg_tools::norms::{Norm, L2};
9 use alg_tools::impl_basic_space;
9 use crate::manifold::{EmbeddedManifoldPoint, FacedManifoldPoint, ManifoldPoint}; 10 use crate::manifold::{EmbeddedManifoldPoint, FacedManifoldPoint, ManifoldPoint};
10 11
11 /// All the difference faces of a [`OnCube`]. 12 /// All the difference faces of a [`OnCube`].
12 #[derive(Copy, Clone, Debug, Eq, PartialEq, Serialize_repr, Deserialize_repr)] 13 #[derive(Copy, Clone, Debug, Eq, PartialEq, Serialize_repr, Deserialize_repr)]
13 #[repr(u8)] 14 #[repr(u8)]
357 fn tangent_origin(&self) -> Self::Tangent { 358 fn tangent_origin(&self) -> Self::Tangent {
358 Loc([0.0, 0.0]) 359 Loc([0.0, 0.0])
359 } 360 }
360 } 361 }
361 362
363 impl_basic_space!(OnCube);
364
365
362 #[cfg(test)] 366 #[cfg(test)]
363 mod tests { 367 mod tests {
364 use super::*; 368 use super::*;
365 369
366 /// Tests that the distancse between the centers of all the faces are correctly calculated. 370 /// Tests that the distancse between the centers of all the faces are correctly calculated.

mercurial