dimforge / dimforge/alga

Metric spaces

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

Description

cgmath currently has a [`MetricSpace`](https://docs.rs/cgmath/0.15.0/cgmath/trait.MetricSpace.html) trait that is defined for vectors, points, and quaternions:

```rust
pub trait MetricSpace: Sized {
type Metric: BaseFloat;
fn distance2(self, other: Self) -> Self::Metric;

fn distance(self, other: Self) -> Self::Metric { ... }
}
```

Could we consider rejiggering the `alga::linear` trait hierarchy to add something like this?

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.