Skip to content

More general arithmetic implementations #1586

@Omnikar

Description

@Omnikar

I was recently trying to use nalgebra in conjunction with the uom (units of measurement) crate, which represents dimensioned quantities at the type level. A consequence of this is that you frequently get situations where things like a * b produce c where a, b, and c all have different types. The case that motivated me to create this issue is that I was trying to multiply a Vector3 of one unit by a scalar of another unit, and when it didn't work, I noticed that nalgebra has a blanket impl of Mul only for inner types that are closed under multiplication. Forgive me if I'm wrong, but shouldn't it be possible to generalize this to arbitrary multiplication input/output types (and of course for the other arithmetic operators as well)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions