diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-11-08 14:50:06 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-11-08 14:50:06 -0500 |
commit | 17f118fbc74a26f55a5263e616faeb20368de9d0 (patch) | |
tree | b83259740f50b935c0c04b5d2ae96a2bc0a00c01 /src | |
parent | 4410d88d7a74cacf704d2fd4851db770da542fd4 (diff) | |
download | acap-17f118fbc74a26f55a5263e616faeb20368de9d0.tar.xz |
Derive Eq in more cases
Diffstat (limited to 'src')
-rw-r--r-- | src/cos.rs | 2 | ||||
-rw-r--r-- | src/euclid.rs | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -403,7 +403,7 @@ where /// assert!(zero < pi_2 && pi_2 < pi); /// /// [angular distance]: https://en.wikipedia.org/wiki/Cosine_similarity#Angular_distance_and_similarity -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, Eq, PartialEq)] pub struct AngularDistance<T>(T); impl<T: Real + Value> AngularDistance<T> { diff --git a/src/euclid.rs b/src/euclid.rs index e1ee3c9..2268a0c 100644 --- a/src/euclid.rs +++ b/src/euclid.rs @@ -161,7 +161,7 @@ where /// assert_eq!(c.value(), 5.0f32); /// /// [Euclidean distance]: https://en.wikipedia.org/wiki/Euclidean_distance -#[derive(Clone, Copy, Debug, PartialEq, PartialOrd)] +#[derive(Clone, Copy, Debug, Eq, PartialEq, PartialOrd)] pub struct EuclideanDistance<T>(T); impl<T: Value> EuclideanDistance<T> { |