dimforge / dimforge/alga

Left multiplication for vector spaces

Open
#24 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
201
Forks
40
PR merge metrics
No merged PRs in 30d

Description

This code example fails:

```rust
fn foo>(a: V, b: V, c: f64) -> V {
a * c + c * b
}
```

with this error:

```
error[E0277]: the trait bound `f64: std::ops::Mul` is not satisfied
|
| a * c + c * b
| ^ no implementation for `f64 * V`
|
= help: the trait `std::ops::Mul` is not implemented for `f64`
= help: consider adding a `where f64: std::ops::Mul` bound
```
(omitted source location in my project for clarity)

Is there a reason, why this can't be made work? As multiplication on the field commutes anyway, the operator should generally be available in this way.

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.