pub trait EuclideanLength<T, RHS = Self> {
// Required method
fn euclidean_length(&self) -> T;
}
👎Deprecated since 0.29.0: Please use the
line.length::<Euclidean>()
via the Length
trait instead.Expand description
Calculation of the length
Required Methods§
Sourcefn euclidean_length(&self) -> T
👎Deprecated since 0.29.0: Please use the line.length::<Euclidean>()
via the Length
trait instead.
fn euclidean_length(&self) -> T
line.length::<Euclidean>()
via the Length
trait instead.Calculation of the length of a Line
§Examples
use geo::EuclideanLength;
use geo::line_string;
let line_string = line_string![
(x: 40.02f64, y: 116.34),
(x: 42.02f64, y: 116.34),
];
assert_eq!(
2.,
line_string.euclidean_length(),
)