summaryrefslogtreecommitdiffstats
path: root/src/chebyshev.rs
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-06-27 17:17:10 -0400
committerTavian Barnes <tavianator@tavianator.com>2020-06-27 17:40:03 -0400
commit07e61231dff21fda6da32929c0eae82fa44f6517 (patch)
tree0279b132f1b3b82f9c4e7ac581d152d052fa3c52 /src/chebyshev.rs
parente466113d70e9786259b3516b5951771b0706e5d8 (diff)
downloadacap-07e61231dff21fda6da32929c0eae82fa44f6517.tar.xz
docs: Update some links
Diffstat (limited to 'src/chebyshev.rs')
-rw-r--r--src/chebyshev.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/chebyshev.rs b/src/chebyshev.rs
index 335b6f1..bddbd5e 100644
--- a/src/chebyshev.rs
+++ b/src/chebyshev.rs
@@ -9,8 +9,8 @@ use num_traits::{zero, Signed};
///
/// This wrapper equips any [coordinate space] with the [Chebyshev distance] metric.
///
-/// [coordinate space]: [Coordinates]
-/// [Chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
+/// [coordinate space]: Coordinates
+/// [Chebyshev distance]: chebyshev_distance
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub struct Chebyshev<T>(pub T);
@@ -43,7 +43,7 @@ impl<T: Coordinates> Coordinates for Chebyshev<T> {
}
}
-/// Compute the Chebyshev distance between two points.
+/// Compute the [Chebyshev distance] between two points.
///
/// ```math
/// \begin{aligned}
@@ -51,6 +51,8 @@ impl<T: Coordinates> Coordinates for Chebyshev<T> {
/// &= \max_i |x_i - y_i|
/// \end{aligned}
/// ```
+///
+/// [Chebyshev distance]: https://en.wikipedia.org/wiki/Chebyshev_distance
pub fn chebyshev_distance<T, U>(x: T, y: U) -> T::Value
where
T: Coordinates,