From 07e61231dff21fda6da32929c0eae82fa44f6517 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 27 Jun 2020 17:17:10 -0400 Subject: docs: Update some links --- src/euclid.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/euclid.rs') diff --git a/src/euclid.rs b/src/euclid.rs index 0f2281e..c1d88ae 100644 --- a/src/euclid.rs +++ b/src/euclid.rs @@ -12,8 +12,8 @@ use std::convert::TryFrom; /// /// This wrapper equips any [coordinate space] with the [Euclidean distance] metric. /// -/// [coordinate space]: [Coordinates] -/// [Euclidean distance]: https://en.wikipedia.org/wiki/Euclidean_distance +/// [coordinate space]: Coordinates +/// [Euclidean distance]: euclidean_distance #[derive(Clone, Copy, Debug, Eq, PartialEq)] pub struct Euclidean(pub T); @@ -46,7 +46,7 @@ impl Coordinates for Euclidean { } } -/// Compute the Euclidean distance between two points. +/// Compute the [Euclidean distance] between two points. /// /// ```math /// \begin{aligned} @@ -54,6 +54,8 @@ impl Coordinates for Euclidean { /// &= \sqrt{\sum_i (x_i - y_i)^2} /// \end{aligned} /// ``` +/// +/// [Euclidean distance]: https://en.wikipedia.org/wiki/Euclidean_distance pub fn euclidean_distance(x: T, y: U) -> EuclideanDistance where T: Coordinates, @@ -175,7 +177,7 @@ impl EuclideanDistance { } } -/// Error type for failed conversions from negative numbers to [EuclideanDistance]. +/// Error type for failed conversions from negative numbers to [`EuclideanDistance`]. #[derive(Debug)] pub struct NegativeDistanceError; -- cgit v1.2.3