From 06e20b4b95e42c47a7d80782ee734c8f0e2c1a98 Mon Sep 17 00:00:00 2001 From: Rouven Spreckels Date: Tue, 27 Jul 2021 15:17:30 +0200 Subject: [PATCH] Add getter for reflection bias. Fix typos. --- src/geometry/reflection.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/geometry/reflection.rs b/src/geometry/reflection.rs index 87166b81..a48b8024 100644 --- a/src/geometry/reflection.rs +++ b/src/geometry/reflection.rs @@ -22,7 +22,7 @@ impl>, const D: usize> Reflection> Reflection { - /// Creates a new reflection wrt the plane orthogonal to the given axis and bias. + /// Creates a new reflection wrt. the plane orthogonal to the given axis and bias. /// /// The bias is the position of the plane on the axis. In particular, a bias equal to zero /// represents a plane that passes through the origin. @@ -33,12 +33,21 @@ impl> Reflection { } } - /// The reflexion axis. + /// The reflection axis. #[must_use] pub fn axis(&self) -> &Vector { &self.axis } + /// The reflection bias. + /// + /// The bias is the position of the plane on the axis. In particular, a bias equal to zero + /// represents a plane that passes through the origin. + #[must_use] + pub fn bias(&self) -> T { + self.bias + } + // TODO: naming convention: reflect_to, reflect_assign ? /// Applies the reflection to the columns of `rhs`. pub fn reflect(&self, rhs: &mut Matrix)