dimforge / dimforge/nalgebra

More general arithmetic implementations

Open
#1,586 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

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)?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.