Function perimeter_vec_vec

Source
pub fn perimeter_vec_vec(x: &[f64], y: &[f64]) -> Vec<f64>
Expand description

§perimeter_vec_vec(x, y)

Geometry Function

The perimeter_vec_vec function calculates the total length of boundaries between corresponding vectors in two slices x and y, returning a vector of results.

§Examples

use mathlab::math::{perimeter_vec_vec, INF_F64 as inf};
assert_eq!(perimeter_vec_vec(&[0.0, 1.0, 1.0, 2.0, inf], &[0.0, 0.0, 1.0, 1.0, 1.0]), [0.0, 2.0, 4.0, 6.0, inf]);

End Fun Doc