Trait ludomath::vec2d::Transformation [] [src]

pub trait Transformation<T>: MaybeInvertible {
    fn transform(self, operand: T) -> T;

    fn transform_mut(self, operand: &mut T)
    where
        T: Copy
, { ... }
fn inverse_transform(self, operand: T) -> T { ... }
fn inverse_transform_checked(self, operand: T) -> Option<T> { ... } }

A trait describing the transformation of some type T.

Required Methods

Returns a transformed copy of an object.

Implementors only need to implement this function, as the other have default implementations based on this.

Provided Methods

Transforms an object, mutating it.

Transforms an object by the inverse of a transformation.

Should not panic even if the transformation isn't invertible.

Transforms an object by the inverse of a transformation.

Returns Some(result) if the transformation is invertible, returns None otherwise.

Implementors