macro_rules! sorted_f64 {
( $collection:expr ) => { ... };
}Expand description
Creates a sorted Vec<f64> from the input.
This is a syntactic sugar for calling sorted! with the closure
|a, b| a.partial_cmp(b).unwrap().
ยงExamples
#[macro_use] extern crate colmac;
// sort some collection that impl's `IntoIterator`
let vec = vec![2.0, 4.0, -1.0];
let sorted_vec = sorted_f64!(vec);
let expected = vec![-1.0, 2.0, 4.0];
assert_eq!(expected, sorted_vec);