Mon, 21 Oct 2024 10:05:07 -0500
Make exp consuming
src/cube.rs | file | annotate | diff | comparison | revisions | |
src/dist.rs | file | annotate | diff | comparison | revisions | |
src/manifold.rs | file | annotate | diff | comparison | revisions |
--- a/src/cube.rs Mon Oct 21 10:02:57 2024 -0500 +++ b/src/cube.rs Mon Oct 21 10:05:07 2024 -0500 @@ -241,7 +241,7 @@ impl ManifoldPoint for OnCube { type Tangent = Point; - fn exp(&self, tangent : &Self::Tangent) -> Self { + fn exp(self, tangent : &Self::Tangent) -> Self { let mut face = self.face; let mut point = self.point + tangent; loop {
--- a/src/dist.rs Mon Oct 21 10:02:57 2024 -0500 +++ b/src/dist.rs Mon Oct 21 10:05:07 2024 -0500 @@ -45,7 +45,8 @@ impl<M : ManifoldPoint> Desc<M> for DistToSquaredDiv2<M> { fn desc(&self, τ : f64, x : M) -> M { - x.exp(&(self.grad(&x) * τ)) + let t = self.grad(&x) * τ; + x.exp(&t) } }
--- a/src/manifold.rs Mon Oct 21 10:02:57 2024 -0500 +++ b/src/manifold.rs Mon Oct 21 10:05:07 2024 -0500 @@ -7,7 +7,7 @@ type Tangent : Euclidean<f64, Output=Self::Tangent> + std::fmt::Debug; /// Exponential map - fn exp(&self, tangent : &Self::Tangent) -> Self; + fn exp(self, tangent : &Self::Tangent) -> Self; /// Logarithmic map fn log(&self, other : &Self) -> Self::Tangent;