Skip to content

Implement Mul for Transform #203

@silverweed

Description

@silverweed

Since chaining multiple calls to Transform::combine is inconvenient, imho the usability of Transform would benefit from having the Mul trait implemented.

I'm guessing the implementation would go something like this:

impl Mul for Transform {
    type Output = Transform;

    fn mul(mut self, rhs: Transform) -> Transform {
        self.combine(&rhs);
        self
    }
}

(However, being relatively new to Rust I don't know if there are any caveats preventing this implementation from working correctly.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions