Function peroxide::util::non_macro::linspace_with_precision
source · pub fn linspace_with_precision<S, T>(
start: S,
end: T,
length: usize,
precision: usize,
) -> Vec<f64>
Expand description
linspace with precision
§Example
use peroxide::fuga::*;
let x = linspace(0, 1e-2, 11);
assert_ne!(x[9], 0.009);
let x = linspace_with_precision(0, 1e-2, 11, 3);
assert_eq!(x[9], 0.009);