src/cube.rs

changeset 37
d7cd14b8ccc0
parent 34
aa6129697116
child 46
90cc221eb52b
--- a/src/cube.rs	Thu Nov 07 16:52:05 2024 -0500
+++ b/src/cube.rs	Wed Dec 04 23:19:46 2024 -0500
@@ -6,7 +6,7 @@
 use serde::Serialize;
 use alg_tools::loc::Loc;
 use alg_tools::norms::{Norm, L2};
-use crate::manifold::{ManifoldPoint, EmbeddedManifoldPoint};
+use crate::manifold::{EmbeddedManifoldPoint, FacedManifoldPoint, ManifoldPoint};
 
 /// All the difference faces of a [`OnCube`].
 #[derive(Copy, Clone, Debug, Eq, PartialEq, Serialize_repr, Deserialize_repr)]
@@ -292,9 +292,12 @@
         }
         (best_tan, best_len)
     }
+}
 
+impl FacedManifoldPoint for OnCube {
+    type Face = Face;
     /// Returns the face of this point.
-    pub fn face(&self) -> Face {
+    fn face(&self) -> Face {
         self.face
     }
 }

mercurial