summaryrefslogtreecommitdiffstats
path: root/src/chebyshev.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/chebyshev.rs')
-rw-r--r--src/chebyshev.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/chebyshev.rs b/src/chebyshev.rs
index fa8e92c..335b6f1 100644
--- a/src/chebyshev.rs
+++ b/src/chebyshev.rs
@@ -44,6 +44,13 @@ impl<T: Coordinates> Coordinates for Chebyshev<T> {
}
/// Compute the Chebyshev distance between two points.
+///
+/// ```math
+/// \begin{aligned}
+/// \mathrm{chebyshev\_distance}(x, y) &= \|x - y\|_\infty \\
+/// &= \max_i |x_i - y_i|
+/// \end{aligned}
+/// ```
pub fn chebyshev_distance<T, U>(x: T, y: U) -> T::Value
where
T: Coordinates,