pub struct MobiusTransform {
pub a: Complex,
pub b: Complex,
pub c: Complex,
pub d: Complex,
}Expand description
A Möbius transformation f(z) = (az + b) / (cz + d) with ad - bc ≠ 0.
Fields§
§a: ComplexNumerator coefficient of z.
b: ComplexNumerator constant.
c: ComplexDenominator coefficient of z.
d: ComplexDenominator constant.
Implementations§
Source§impl MobiusTransform
impl MobiusTransform
Sourcepub fn new(a: Complex, b: Complex, c: Complex, d: Complex) -> Option<Self>
pub fn new(a: Complex, b: Complex, c: Complex, d: Complex) -> Option<Self>
Create a new Möbius transformation. Returns None if det = ad - bc = 0.
Sourcepub fn apply(self, z: Complex) -> Option<Complex>
pub fn apply(self, z: Complex) -> Option<Complex>
Apply the transformation to z. Returns None at the pole cz + d = 0.
Sourcepub fn compose(self, other: Self) -> Option<Self>
pub fn compose(self, other: Self) -> Option<Self>
Compose two Möbius transformations: (self ∘ other)(z) = self(other(z)).
Sourcepub fn invert(self) -> Option<Self>
pub fn invert(self) -> Option<Self>
Invert the transformation: f^{-1}(z) = (dz - b) / (-cz + a).
Sourcepub fn fixed_points(self) -> Vec<Complex>
pub fn fixed_points(self) -> Vec<Complex>
Fixed points of the transformation: solutions to f(z) = z. Solves cz² + (d - a)z - b = 0.
Trait Implementations§
Source§impl Clone for MobiusTransform
impl Clone for MobiusTransform
Source§fn clone(&self) -> MobiusTransform
fn clone(&self) -> MobiusTransform
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MobiusTransform
impl Debug for MobiusTransform
impl Copy for MobiusTransform
Auto Trait Implementations§
impl Freeze for MobiusTransform
impl RefUnwindSafe for MobiusTransform
impl Send for MobiusTransform
impl Sync for MobiusTransform
impl Unpin for MobiusTransform
impl UnsafeUnpin for MobiusTransform
impl UnwindSafe for MobiusTransform
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more